Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make it so you don't have to reset/respawn to see new starter guis?

Asked by 7 years ago
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"?

0
When I refresh, the gui comes up just fine, trying to find a way for it to come up without refreshing. http://prntscr.com/eqjp8p Speedracerpro -4 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago

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.

0
Thank you Speedracerpro -4 — 7y
Ad
Log in to vote
-1
Answered by 7 years ago

Change the PlayerGui, not the StarterGui. Look it up.

Answer this question