So, if your distance is not 10 then the billboard gui will be enabled but if you are in 10 distance then the gui will get removed but for some dumb reason it dosent do that so insted it are giving me an error why?
Script.
local door = game.workspace.Gandalf.head
while true do
for i,v in pairs(game.Players:GetChildren()) do
if (v.Character.Torso.Position - door.Position).magnitude <= 10 then
if door.TrackGui then
door.TrackGui:Destroy()
end
end
end
for i,v in pairs(game.Players:GetChildren()) do
if (v.Character.Torso.Position - door.Position).magnitude >= 10 then
game.ServerStorage.TrackGui:Clone().Parent = door
end
end
wait()
end
Error.
23:39:19.341 - TrackGui is not a valid member of Part
23:39:19.342 - Stack Begin
23:39:19.342 - Script 'Workspace.Gandalf.Head.Script', Line 6
