hello devforum, i’m having a bit of trouble getting a script to work. it’s function is supposed to be a specific player in the game gets a higher animation speed for a specific animation, but it doesnt seem to work.
here is the script, can somebody help me? P.S, nightcaller helped alot.
> local player = {"Iifeform"}
> local animation = game.Workspace.Script.Animation
>
> game.Players.PlayerAdded:connect(function(plr)
> plr.CharacterAdded:connect(function(chr)
> for i = 1, #player do
> if player[i] == plr.Name then
> local animationTrack = chr.Humanoid:LoadAnimation(animation)
> animation.AnimationId = "http://www.roblox.com/asset/?id=3269465718"
> function playAnimationForDuration(animationTrack, duration)
> local speed = animationTrack.Length / duration
> animationTrack:AdjustSpeed(2)
> animationTrack:Play()
> end
>
> playAnimationForDuration(animationTrack, duration/2)
>
> end
> end
> end)
> end)
thank you!