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

How can I move to a location by moving 5 studs every time to it?

Asked by 6 years ago

oes any one know how i can teleport my thing towards my character by increments, like making it move 5 studs?

https://media.discordapp.net/attachments/165226280118255616/500509023771033601/howtotpherepls.png - example

0
This link is invalid, I would update your link to something like imgur instead. Your title and post lead me to believe you want something like this, but without your visual I may be completely wrong. (https://twitter.com/tweetequinox/status/916460593674096641) SummerEquinox 643 — 6y
0
Yes just like that, but without the parts. I need the humanoid to move 5 studs towards the object legomantex -60 — 6y
0
So you want it to be like that - however the part moving to the end-point is a teleporting player? SummerEquinox 643 — 6y
0
yes legomantex -60 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

I have modified the code from the tweet above to suit your needs. Please take a look at the code to see what I have done and how this works. (https://www.roblox.com/games/1088334573/Robloxs-New-Pathfinding-APIs)

This specific method relies solely on pathfinding - a built in Roblox service that can be used for things such as this. You can also do it with math - but since I had this on hand I have left it as such.

Helpful links to learn from:

Pathfinding

SetPrimaryPartCFrame

0
Thank you a lot legomantex -60 — 6y
Ad

Answer this question