I want to make an if statement testing if a player load character. The issue I keep getting with my if statement is that when I join the game I keep respawning nonstop. Script in ServerScriptService:
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
if Player:LoadCharacter() then--if statement broken
wait(6)
Player.PlayerGui.MainUI.Enabled = true
Player.PlayerGui.MoneyGui.Enabled = true
end
end)
end)
Gui button
game.Players.PlayerAdded:Connect(function(player)
player:GetChildren(player)
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.LoadPlayer:FireServer()-- make a remote event named LoadPlayer
player:LoadCharacter()
end)
end)

1 comment
Still won't work when I clicked the load character button in my game the gui still didn't go visible.