I recently looked up how to get my 'RadioGui' to only show up on the 'Police' team. I followed a tutorial from 6 years ago, and it works perfectly fine except for one thing: my GUI disappears when I die/reset.
My script in Workspace, called 'RadioTeamScript':
game.Players.PlayerAdded:connect(function(plr)
if plr.TeamColor == BrickColor.new("Dark blue") then
local gui = game.ReplicatedStorage.RadioGui
gui.Parent = plr.PlayerGui;
end
end)
I've placed my 'RadioGui' in Replicated Storage. I need a solution so, if my character dies/resets, it will not delete the GUI - it needs to stay on the screen all the time!
I'm trying this in a test server, and also, playing in a real multiplayer server does not work. It appears for the 'Police' team only and not the 'Civilian' team, as intended, however if I reset or die on the 'Police' team my GUI disappears never to be found again. Of course, I have tested many times and the 'RadioGui' always disappears after my death. I was thinking a loop could possibly work but 1. I do not know how to script one and 2. It may just make the radio overlap itself infinite times.
Any questions I'll be glad to respond to as I'm not a great scripter and this is my first question on the site! Thanks.

1 comment
If my answer fixed it mark it as accepted