Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How to MoveTo local character?

Asked by 14 days ago

Hey there! I got an question: How to MoveTo your local character to a brick in the workspace. I mean that the local player walk to the brick in the workspace. I tried alot but it didn't work. Can anyone explain me this?

Sincerly Nathan EggService The Netherlands

1 answer

Log in to vote
0
Answered by 14 days ago
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
        char:WaitForChild("Humanoid"):MoveTo(--put the brick here)
    end)
end)

This script basically waits for every character added in game, and then uses the event MoveTo for moving him to the brick you've set. MoveTo is pretty useful for NPCs and AIs, also if you didnt know, PlayerAdded fires when a player joined, and characteradded when a character was added (even with respawning), as it name says.

Hope i helped, if it works, it would be nice to get this as accepted answer ;)

Ad

Answer this question