Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 2 months ago
Edited 2 months 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 1337 — 2mo
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 — 2mo
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. Denny9876 1270 — 2mo
0
I will give that a try. Thank you! Perthrosama 24 — 2mo

Answer this question