Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

How Would I Make A Script Where It Moves My Character To A Certain Point?

Asked by 5 years ago

Like a fashion show game. When you are getting ready to participate, the game will move your character for you and you won't have to do it manually. How would I do something like this?

2 answers

Log in to vote
3
Answered by
Isaque232 171
5 years ago

Hello, I suggest you to look at the function MoveTo from Humanoid as It explains exactly what it does and also gives examples of how it would work, It attempts to make the player's humanoid walk to the given location you've put in It's parameters, for example:

game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid"):MoveTo(game.Workspace.YourPart.Position)

(Click view source to see it all)

Would attempt to make the LocalPlayer walk to the "YourPart" position at workspace. The article also explains how you should know when the Player did finish walking to the position with MoveToFinished and some things that will really help you understanding what it does and what you can do with it!

Hopefully this helps with your issue, make sure to accept the answer if it did solve it!

1
Good answer! Knineteen19 307 — 5y
Ad
Log in to vote
1
Answered by 5 years ago

For something like this, I think you would be best off using:

humanoid:MoveTo(PositionToMoveTo)

Or say you wanted to move them to a certain part:

humanoid:MoveTo(PositionOfPart,Part)

Roblox Developer Page on humanoid:MoveTo: https://developer.roblox.com/api-reference/function/Humanoid/MoveTo

There's only one problem with this though, you would have to disable the player being able to move, so their movement is only toggled by the script moving them. If like a fashion game, you wanted to make so the player can walk around while looking at their clone up on stage, then you could simply make a clone of their character, and move the clone into the spot.

However, if you wanted to make so the player's camera is standing there, but the player can't move any sort of camera and can only look at the stage, you would have to do a bunch of stuff with cameras, which I'm not too good with.

The best I can do if you want to mess around with cameras is give you this link: https://developer.roblox.com/articles/Camera-manipulation

I hope this was helpful!

Answer this question