I want to create a script that will spawn items only within a certain area. Say for example I clone a part from replicated storage but I only wanted it to be cloned randomly within the radius of another part.
COMMUNITY QUESTION
How do I make a script that will clone an object into a certain area only?
1 answer
In english: Set its position to the other parts position- offset by a random number capped at "radius". let's say flat.
In Lua:
--these are madeup variables you would have to create them
--radius is 50
newPart.Position = otherPart.Position + Vector3.new(math.random(50),0,math.random(50))
cheers there's not much to explain there. If you don't understand Vector3 then read up on wiki you'll get it
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Attempt: "make an effort to achieve or complete (something, typically a difficult task or action)."