![]() Mine is a bit advanced but it gives an example of what you could do with just ray-casting & user input.How To Make A Gun In Roblox Studio. There are various ways to implement this, my game uses a cache-based weapon system which stores the guns for later use once they've been equipped once. 1 Being the time between current animation states & the animation track's initial playing state. Local AnimationTrack = Animator:LoadAnimation(Animation)ĪnimationTrack.Priority = - Change the priority.ĪnimationTrack:Play(.1). local Animation = Instance.new("Animation")Īnimation.AnimationId = "rbxassetid://0" - My animation ID. You can set cooldowns with a debounce variable and play animations on activation (depending on whether or not the cooldowns have completed). If you are making weapons, use UserInputService and WorldRoot:Raycast for handling mouse and ray-casting related operations.įor melee weapons I would suggest just sticking to the tool as you are already doing. Local rootPart = character:FindFirstChild("HumanoidRootPart") ![]() Local humanoid = character:FindFirstChildOfClass("Humanoid") Here are the two main functions you may want to consider trying for your weapon: local function fling(character)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |