GUI appearing after user resets himself/herself

Hello,

I’ve been trying to fix the current issue that I’m having, which is, when the user resets/dies, the weapon frame appears. Normally, when the user is in the civillians team, the weapons frame shouldn’t be appearing, however it does after user resets himself or gets killed. Any ideas on how to fix this?

Solutions I tried:
-Making a localscript inside StarterCharacterScripts which is:
‘’‘game.Players.CharacterAdded:Connect(function(playermodel)
playermodel:WaitForChild(“Humanoid”).Died:Connect(function()
game.ReplicatedStorage.Events.Client:FireClient(playermodel, “Civ”)
end)
end)’’

-Pasting the script above to my serverscript
-Removing the “ResetOnSpawn” option at the GUI, which was a failure
-A few more approaches

I want the GUI to still be disabled when character resets himself/herself or dies.
I have a script that disables the GUI automatically when user joins for the first time and changes his/her team to “Civillians”

Any help would be really really appreciated!

1 Like

So i’m Settling for the reset Issue
so you Should disable the reset button

Tried disabling ResetOnSpawn feature, the problem i faced was the GUI not being shown for other teams

CharacterAdded isn’t part of the Players service. I think what you meant to put there was PlayerAdded. Once you have the player, you can connect the CharacterAdded event to them. I hope the example I provided below can help.

Server script:

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        -- The rest of your code goes here
    end)
end)

I’ll try that tomorrow and tell you the outcome, thanks for the help in advance

1 Like

I tried doing the thing you said, and now the GUI appears even when they join, I don’t know why but weird

Nevermind, I messed up something somewhere, just fixed it. I still can’t disable it when user respawns though

Did you turn off the reset on spawn property under the gui?

2 Likes

ScreenGuis have a property called “ResetOnSpawn” that might be what you’re looking for.

1 Like

Nevermind, fixed it by making a new value and then setting its property to true every time player spawned. Thanks for the help though!

1 Like