Not quite sure where to start here. I want to check if a player is outside, meaning there are no blocks above them. Any ideas or solutions on where to start? I just need this part, I can do the rest of the blizzard script.
✓ ANSWER ACCEPTED
Detecting if a player is "outside"?
1 answer
✓ Accepted answer
You could use a ray to find out if there's a part immediately above the character's head. In a nutshell, a ray is a line that is finite in one direction and infinite in the other.
function isInside (char)
local head = char:WaitForChild("Head")
local ray = Ray.new(head.Position , Vector3.new(0 , 1 , 0) * 999)
if workspace:FindPartOnRay(ray , char) then return true end
return false
end
Basically, the idea is to make a ray that starts at the head's position and goes upwards. If the ray intersects with a part then the player is indoors. We also need to pass in the character instance as a parameter to tell that the ray should ignore any descendants of the character model.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Actually, problem popped up with this.
The ray you create always points South. How would I make it point straight upwards?
Fixed!
You accepted answer after one year. Noice