Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.