I want to make a zone where any player that is currently inside the zone can teleport to anywhere else inside the zone with a click of a mouse. I was wondering how I can do this and detect mouse position. Here is what I currently have but it des not work.
local room = game.Workspace:FindFirstChild(Player.Name.." OpeRoomMesh")
local Distance = (Mouse.Hit.p - room.Position).magnitude
if Distance > room.Mesh.Scale.X then
return
elseif Distance < room.Mesh.Scale.X then
print(Mouse.Hit.p)