Hello. I have this script that is supposed to reset the GUI on spawn. I know there is something called "ResetOnSpawn" but this doesn't work in this situation. I am new to roblox scripting, so if this is a stupid question thats why.
Here is my Server script:
script.Parent.ResetGuiSpawn.OnServerEvent:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
Char.Humanoid.Died:Connect(function()
wait(5);
script.Parent.ResetGuiSpawn2:FireClient() -- This is where it says the error is
end)
end)
end)
-- The remoteevent activates when someone clicks a button on a GUI
Here is my local script:
script.Parent.ResetGuiSpawn2.OnClientEvent:Connect(function()
Player.PlayerGui.ChangeTeamGui.Enabled = true
end)
Any help would be appreciated.

2 comments
idk the script, but im typing this comment to give you a notification so that you will think that someone actually answered your question lolol
but they did