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

How do I have players switch to an animation when they touch a specific block?

My plan is to give them a walking animation once they step onto a block and they will change back to the default walking animation when they step off! How would I do this? Thanks! P.S. I am very inexperienced so please direct me where to put what.

1 comment

0

Not a request site!

1 answer

✓ Accepted answer

Here is a very basic script.

Make sure to put the script in the part!

Make sure to make an animation thing in the script!

Make sure put the animation ID in the animation thing!

script.Parent.Touched:connect(function(m)

wait(0.1)
local an = m.Parent.Humanoid:LoadAnimation(script.Animation)

if  m.Parent.Humanoid then
	an:Play()
	wait(2) --How long the animation is

	an:Stop()
end
end)

THIS IS NOT A REQ SITE!

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