Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My tool Animation wont play when clicked (used for a simulator)?

Asked by 2 years ago

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)
0
You might have to say script.Parent:WaitForChild("Animation") ghostbettert 30 — 2y

Answer this question