admin = {"Player1"} game.Players.PlayerAdded:connect(function(nP) for _,v in pairs(admin) do if nP.Name == v then nP.Chatted:connect(function(msg) if msg == ">Load Caves" then wait(1) x = game.Lighting.Caves:Clone() wait(0.1) x.Parent = game.Workspace y = game.Lighting.MapLoadedGui:Clone() y.Parent = Game.StarterGui game.StarterGui.MapLoadedGui.Frame.TextBox.Text = "Map Loaded: Caves" wait(3) y:Destroy() end end) end end end)
I'm making a script that loads a map when an admin says ">Load Caves". The map part is working perfectly. But the gui only shows up when I reset or respawn or refresh myself. How do I make it so the gui shows up as soon as it's put in "game.StarterGui"?
Instead of putting the Gui into the StartGui, you need to put it in the nP's PlayerGui inside the player so it can be visible instantly.