![]() Speed that bullets/projectiles travel when shot. Anything hit beyond this distance will receive less and less damage as the distance nears ZeroDamageDistance.Īnything hit at or beyond this distance will receive no damage. Maximum distance that shots will do full damage. Number of shots per click/burst only matters if you set FireMode to Burst. Time between each shot in a burst only matters if you set FireMode to Burst. For weapons with FireMode of Automatic, this is also the time between shots while pressing the fire button or holding click. Note that ammo is unlimited and this does not specify how much ammo a player is carrying.Ĭhoose from either Semiautomatic (one shot per click/tap), Automatic (continuous fire), or Burst (burst of shots equal to NumBurstShots on each click/tap). Mine is a bit advanced but it gives an example of what you could do with just ray-casting & user input.Number of shots in each "ammo clip" before player must reload. 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 |