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

Whats wrong with this animation script?

Asked by
neoG457 315 Moderation Voter
9 years ago
function onClicked(playerWhoClicked)

    local animation = Instance.new("Animation")
            animation.AnimationId = "http://www.roblox.com/Asset?ID=218069004" 

        local animTrack = Humanoid:LoadAnimation(animation)
                animTrack:Play()

    animTrack:Play()
    end

        script.Parent.ClickDetector.MouseClick:connect(onClicked)

The animation should play when the brick is click but it doesnt, could you tell me whats wrong with it?

0
YOu haven't set the parent of the player who clicked it make line 3: local animation = Instance.new("Animation", playerWhoClicked.Humanoid) Mystdar 352 — 9y
0
Nope, sorry still not working... neoG457 315 — 9y

Answer this question