Make a 2D element follow a path with a fixed speed

, ,

I’m creating a ZUMA-like game in ROBLOX, however I’m stuck at making the balls move in a specific path.

This is one of the maps in my game. The path is the pink trail on the map. (I don’t have textures for the balls yet so it’s just squares). At first I’ve thought of making a lot of waypoints and moving the balls to each of them one by one:

The white squares are the waypoints.
I’ve tried to make them go along these “waypoints” by using TweenService, but I couldn’t make it move in a fixed speed. In the image above you can see two lines, one orange and one tiny yellow one. The balls movement looked way slower on the orange path than on the yellow path. Obviously because it’s longer. Next, I tried using :Lerp but that also didn’t move in a fixed speed. This method wasn’t very good anyways, as with harder, more curvier maps you’d have to create hundreds of waypoints, which would be way too time-consuming.

So what I want to achieve is: have a GUI object such as ImageLabel (or preferably a table of multiple ImageLabels) follow a path at a fixed speed. Thanks for any help or advice.

1 Like

I think the reason why it doesn’t move at a constant speed is because of the EasingStyle. If you want to move it at a constant speed, use Linear.

1 Like

I don’t know how I didn’t think of that lol

lol xd


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.