I'm making a railgun that has custom animations, one for holding it normally and one for firing it. I am not good at playing animations are anything related to it, so it's probably gonna look really stupid, so sorry about that!
local tool = script.Parent
local UserInputService = game:GetService("UserInputService")
tool.Equipped:Connect(function()
script.Hold:Play()
end)
tool.Unequipped:Connect(function()
script.Hold:Stop()
end)
UserInputService.InputBegan:Connect(function(InputObject)
if InputObject.UserInputType == Enum.UserInputType.MouseButton1 then
script.Fire:Play()
end
end)
Thank you if you can help.

1 comment
Edited it!