I wanted to make this speed potion tool, I made an animation for it using animation editor. I'm new to scripting so I may have made a stupid mistake. Animations name is ZTZ, that's what that's about down there.

local CanActivate = true
local player = game.Players,LocalPlayer
local character = player.Character

script.Parent.Activated:connect(function()
	if CanActivate = true then
		local animation = character.Humanoid:LoadAnimation(script.Parent.ZTZ)
		animation:Play()
	end
end)

Any idea what I did wrong? Any help on this and how to avoid making the same mistake would be very helpful! Thank you! :D

3 comments

0

local player = game.Players.LocalPlayer* You added "," instead of "." after "Players"

0

Well, as I said a stupid mistake may have been made... Thank you very much for pointing that out Xdeno. So after changing "," to "." it should begin to work?

0

Tested it, guess no... But that was still a problem, I am now one step closer to fixing this thanks to you!