Hi, I’m trying to make a cloud move randomly above my map. I’m not sure how to make it move randomly within a certain area. I searched the forum and couldn’t find anything beside how to make a part move randomly. If anyone on here has any tips on this please share.
It really depends on how you want the cloud to move. One way would be to make a random point (CFrame.new(math.random(min, max), y, math.random(min, max))) and then tween the cloud to that point, and repeat.
When you do a search, you often need to break it down into parts. Find out how to move a part, then find out how to make something random. Combine the two concepts as @PerilousPanther has done.
If you’re working with clouds, try using this: Dynamic Clouds | Roblox Creator Documentation
If you can’t use this for what you’re trying to do, use Model:PivotTo()
like this:
local range = 10
Cloud:PivotTo(Cloud:GetPivot() * CFrame.new(math.random(-range,range), 0, math.random(-range,range)))
This will offset the model position on the X and Z axis by a random amount.