Gui will follow remove function with 1 player but not 2 players?
Right so, the gui is meant to be removed when it for fills it's purpose, and it will remove BUT only when there is 1 player in the server, This is a localscript within a TextButton, The Gui gets clones to the lighting by a normal script which in my workspace. Thanks for your help.
Gui Clone script:
1 | game.Players.PlayerAdded:connect( function (player) |
2 | game.Workspace.Map 1. ScreenGui:Clone().Parent = game.StarterGui |
Gui script:
01 | repeat wait() until game.Players.LocalPlayer |
02 | local i = script.Parent |
03 | local map = workspace.Map 1. Stadium.sa |
04 | local gui = script.Parent.Parent.Parent |
05 | local tele 1 = game.Workspace.Map 1. Tele 1 |
06 | function onButtonClicked() |
07 | local plr = game.Players.LocalPlayer |
08 | local character = plr.Character |
09 | if (plr and character ~ = nil ) then |
10 | character:MoveTo(map.Position) |
11 | tele 1 :Clone().Parent = plr.PlayerGui |
12 | script.Parent.Parent.Parent:Destroy() |
15 | i.MouseButton 1 Down:connect(onButtonClicked) |