Hi, I want the player to step up on a part wich has a OnTouch function, so it activates a music. there is a monster nearby wich is eating somebody and it has already an animation. So I wanted that when the player gets on the part the monster stop eating the body and flys to the player. I already created all the animations I just can't switch one to another it just keep doing the first animation.

1	local SC = script.Parent
2	function onTouched(part)
3	game.Workspace.FunnyPart.CanCollide = true (This is the parti)
4	 
5	end
6	 
7	SC.Touched:connect(onTouched)

then when (FunnyPart, CanCollide = true) it will stop the first animation and start the second one

Animation1 is the animation when he's eating and 2 is the one flying to the player (kills it)

view source

01	local animation = script:WaitForChild('Animation1')
02	local humanoid = script.Parent:WaitForChild('Humanoid')
03	local Eating = humanoid:LoadAnimation(animation)
04	local animation2 = script:WaitForChild('Animation2')
05	local Killing = humanoid:LoadAnimation(animation2)
06	 
07	Eating:Play()
08	 
09	if game.Workspace.FunnyPart.CanCollide == true () then
10	    wait(4)
11	    Eating:Stop()
12	        Killing:Play()
13	end

I did this beacause I don't know how to tell the the other script (if) to start when it touches it.

And it still doesn't work.