Basically, I have a ServerScript inside of a tool (I used a ServerScript instead of Functions so hackers can't give themself infinite "gas" yet for some reason the Animation wont play, the script works fine except the animation

script.Parent.Activated:Connect(function()
	local Character = script.Parent.Parent
	local Player = game.Players:GetPlayerFromCharacter(Character)
	
	local Anim = Character.Humanoid:LoadAnimation(script.Parent.Animation)
	
	Player.leaderstats.Gas.Value += 1
	Anim:Play()
end)

1 comment

0

You might have to say script.Parent:WaitForChild("Animation")