I am trying to make a sort of item drop system however i want it to drop on certain terrain however, i cant detect terrain! Here is my code:
local x = math.random(-1300,1300)
local z = math.random(-1300,1300)
local ray = Ray.new(Vector3.new(x,500,z), Vector3.new(90,0,0))
local part, position = workspace:FindPartOnRay(ray, workspace.Spawn, true, false)
print(part)
This only returns nil, so i have no idea what the problem is
