Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

4 comments

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)

0

Yes just like that, but without the parts. I need the humanoid to move 5 studs towards the object

0

So you want it to be like that - however the part moving to the end-point is a teleporting player?

0

yes

1 answer

✓ Accepted answer

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

1 comment

0

Thank you a lot

This discussion is preserved as it was. New answers, comments, and votes are closed.