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

StarterGui doesn't load if Players.CharacterAutoLoads = false ?

Asked by 5 years ago
Edited 5 years ago

I have a ScreenGui inside StarterGui that contains a class system and a respawn button for manually loading the character after a player dies. The problem is this GUI does not load when a player joins for the first time because the game does not autoload characters. What would be some workarounds to this problem? Is the only solution to use something like this with remote events?

-- Server script

game:GetService("Players").PlayerAdded:Connect(function(player)

    playerLoadedEvent:FireClient(player)

end)
-- Local script

local function onPlayerLoaded()
    player.PlayerGui.ScreenGui.Enabled = true
end

playerLoadedEvent.OnClientEvent:Connect(onPlayerLoaded)
0
ScreenGui doesn't have a Visible property (You either mean Enabled or a GuiObject's Visible property). Try waiting for the instances in the local script. xPolarium 1388 — 5y
0
What I'm trying to ask is what is the best method of giving a player a GUI when the character isn't loaded yet? Perthrosama 24 — 5y
0
You would probably have to manually clone your GUIs into the player’s PlayerGui. GUIs in StarterGui don’t clone to the player’s PlayerGui if their character hasn’t loaded in. I recommend putting those GUIs in ReplicatedStorage or you might have duplicate GUIs if the character loads in. User#20279 0 — 5y
0
I will give that a try. Thank you! Perthrosama 24 — 5y

Answer this question