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

is it possible that when you touch a brick it plays an animation then you die?

Asked by 3 years ago

Hello People of the DevForum, i am new here, i want to know, how i could do that. I have tried watching for other solutions, but didn't found anything. Any help would be mor ethan welcome. The question, better explained is: I want that if a player touches a brick, they cannot move from the spot, play an animation, and when they are done with the animation, they die. I would appreciate help a lot, i won't be super active, but i will try, thank you!

1 answer

Log in to vote
0
Answered by 3 years ago

uh i think u do somthin like dis

script.Parent.Touched:Connect(funtion(hit) -- when they touch part
    local character = hit.Parent -- get character
    character.Humanoid.WalkSpeed = 0 -- makes it so they cant walk or jump
    character.Humanoid.JumpPower = 0

    -- play animation and wait until animation ends (i suc at animations so me not gona try hehehe)

    character.Humanoid.Health = 0 -- kill player

end)
Ad

Answer this question