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)

4 comments
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.
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?
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.
I will give that a try. Thank you!