This would get how much light there is at a position. (0-1000) This could help for games where a monster or something would only spawn at positions with low light.
pos is a Vector3.
Example:
if game.Workspace:GetLightLevel(Vector3.new(0,0,0)) < 30 then
local g = game.Lighting.Slime:Clone()
g.Parent = workspace
g:MakeJoints()
g:MoveTo(Vector3.new(0,0,0))
end |