As the title states, I want to make this script run on Player Respawn instead of just when they join the game, can't see to work out how.
game.Players.PlayerAdded:Connect(function(plr) if plr:GetRankInGroup(Army) == 255 then --- Field Marshal plr.PlayerGui.SpawnGui.MainFrame.Kit.Ranks.FM.ArmGiverL.Disabled = false plr.PlayerGui.SpawnGui.MainFrame.Kit.Ranks.FM.ArmGiverR.Disabled = false end end)
The CharacterAdded
event will fire everytime a Player's character spawns initially or respawns.
https://wiki.roblox.com/index.php?title=API:Class/Player/CharacterAdded
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) --Code inside here will run when player "respawns" end) end)