local g = game.Workspace.GuiGive2 while true do for i,v in pairs(game.Players:GetChildren()) do if (v.Character.Torso.Position - g.Position).magnitude <= 10 and v.PlayerGui.Teleport.Game.Visible == false then v.PlayerGui.Teleport.Game.Visible = true end if (v.Character.Torso.Position - g.Position).magnitude >= 10 and v.PlayerGui.Teleport.Game.Visible == true then v.PlayerGui.Teleport.Game.Visible = false end end wait() end
It's suppose to work so when someone comes near the brick it shows a gui
g = game.Workspace.GuiGive2
Change this line to
g = game.Workspace["GuiGive2"]