Hello there, i have a problem with resetting character in my game. Do you how how can i add some functions that will be done after player reset character? I need to change some of his variables. Thanks for help!
local PlayerService = game:GetService("Players") local function onPlayerAdded(player) local function onCharacterAdded(character) -- Code here for when the character loads end if player.Character then -- for existing characters onCharacterAdded(player.Character) end player.CharacterAdded:Connect(onCharacterAdded) -- on new character loads end for _, existingPlayer in pairs(PlayerService:GetPlayers()) do -- for existing players onPlayerAdded(existingPlayer) end PlayerService.PlayerAdded:Connect(onPlayerAdded) -- on new player enters the game