This is a new one to me:
Attempt to index global? What? There’s no attempt to call any globals here.
Here’s the code the error occured in:
local Bunker = script.Parent.Parent
local module = {}
function module.IsSafe(Pos)
if not Pos then return false end
if Bunker.Active.Value == true then
if (Pos.X < 513 and Pos.X > 364.7 and Pos.Y < 27.6 and Pos.Y > -5.1 and Pos.Z < -337.8 and Pos.Z > -383) or Displacement.X^2 + Displacement.Z^2 < 2916 then
local Displacement = Pos-Bunker.Shield.PrimaryPart.Position
return true
end
end
return false
end
return module
And here’s the code that called it:
I have never seen this before and have no idea what to do about it