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

Hit A Brick, Player Plays Animation And Freezes?

Asked by 6 years ago

Anyone know how to do this?

You hit a brick with a touch event. It makes the player freeze and plays a animation moving them up or down

1 answer

Log in to vote
0
Answered by 6 years ago
chr = game.Players.LocalPlayer.Character

hum = chr.Humanoid

game.Workspace.Part.Touched:connect(function() -- hit the brick

 playAnimation = hum:LoadAnimation(game.Workspace.Animation) 

hum.WalkSpeed = 0  

wait(0.05)

playAnimation:Play() -- Plays the animation
0
tell me if it doesnt works HeisukeKexji 8 — 6y
Ad

Answer this question