I basically want to create animated moving clouds under the tween service, I need a couple of clouds to be moving along only the y axis in a repeated loop. I can identify the clouds yet I can’t figure out how to use tween service to move them along the y axis, and keep them in their x and z positions.
This is the code I have currently, it is all functioning and prints, “works” if they are called a cloud.
for _, v in pairs (game.workspace.DoodleBorder:GetDescendants())do
if v.Name == "Cloud" then
print("works")
end
end
I have been looking on the dev forum and the documentation for a while but haven’t found any relevant answer.
To tween them only on the y axis you just need to make the tween goal have the same x and z values as the current(or start) position.
Just stuff you could do to have better performance
Something very helpful you could use for more performant searching is CollectionService(you could tag the items with cloud).
Another way to increase performance is to ditch tween service and use physics based movers(you can just turn off can collide to ensure they reach destination).
I would use AlignPosition for that.
Sounds good, I sorted out CollectionService and that is working, I’m not quite sure how to use the physics aspects though, I looked at a video to summarise how Align Position and general Mover Constraints work, but I’m not to sure on how to apply that to all the models I want if that makes sense? Like if I would have to manually tween every single cloud using the Constraints?