Posted this yesterday, I guess I had to be way specific. Im trying to make the Player, Move to an Specified Part, then after 5 seconds Move to other.
when Stepping on a part - Go to other - After 5 seconds - Go back!
local Member = game.Players.LocalPlayer local Target = game.Workspace.Here local Out = game.Workspace.out function onTouch(hit) workspace.Member.Humanoid:MoveTo(Target.Position, Target) wait(5) workspace.Member.Humanoid:MoveTo(Out.Position, Out) end script.Parent.Touched:connect(onTouch)
**And yes. The Script is in a LocalPlayer ** The thing is that when the part it's touched. Nothing happengs.
Your touched event is triggered based on your player touching something,
script.Parent.Touched:connect(onTouch)
If this is inside of the player then it would fire anytime the player touches anything
Normal script inside the part you want to touch
script.Parent.Touched:connect(function(player) if(hit.Parent:findFirstChild("Humanoid")) then hit.Parent.Humanoid:MoveTo(Target.Position,Target) wait(5.00) --instead of waiting why not wait til its finished? up to you hit.Parent.Humanoid:MoveTo(Out.Position,Out) end end)
In case you want to use MoveToFinish
http://wiki.roblox.com/index.php?title=API:Class/Humanoid/MoveToFinished