Random X,Z coordinate inside of part

I’m trying to fire a ray from the top of a part to get a random location within the part, I’m wondering how I could get a random X coordinate that is within the part.

local rayOrigin = Vector3.new(nil , part.Position.Y + part.Size.Y , nil)

Why don’t you use math.random(-part.Size.X/2, part.Size.X/2)

1 Like

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