I have a script where it removes a previous script and replaces it with a new one but I can't figure out how to make it so the new one saves after resetting.
Here is the script:
local re = game.ReplicatedStorage.Green re.OnServerEvent:Connect(function(player) for i, v in pairs(game.Players:GetChildren()) do v.Backpack.BeatSyncs:ClearAllChildren() end wait(0.1) for i, v in pairs(game.Players:GetChildren()) do local clubcolor= game.ServerStorage.BeatSyncClientGreen:Clone() clubcolor.Parent = v.Backpack.BeatSyncs end end)
A way you can do this is by having a script watching the players and if they die What you need to do is make the script you want in their back pack placed into the death watch script as its child then disable it and have the death watch script watch on the players death copy the script and then move the copy to the backpack and then enable it by turning disabled = false
Sorry there is no code wasn't too clear on how yours was set up but at least here is what would be needed for the death watch script
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) repeat wait() until character.Humanoid character.Humanoid.Died:connect(function() end) end) end)