So I'm not sure how to use random. Please explain how I would let the y stay the same but the x and z change by a random amount but within a range.
COMMUNITY QUESTION
Using random, how would I make a part change its x,z move randomly within 10 studs?
1 answer
Use math.random() in only the x and y positions of the Vector3.
part = game.Workspace.PARTLOCATION
game.Workspace.Part.Position = Vector3.new(part.Position.X + math.random(-10,10), part.Position.Y, part.Position.Z + math.random(-10,10))
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Hey thanks. You've been really helpfull today!
No problem!