I have 2 scripts, that change the players avatar, based on name and player ID. I want those changes to STAY, after they reset.
What is the issue?
After the player resets, all the changes go back to the basic thing. Example: The main StarterCharacter’s suit is yellow, but in a script, it is set that my player ID, makes mine Green. It makes it green when I spawn in, but after I reset, it goes to that basic yellow.
Player Name Script:
Player ID Script:
What solutions have you tried so far?
Asked a couple scripter friends about it, no answer.
The scripts work, and do what I want, but they don’t stay. After I reset, both go back to the things they were before. I’m not a great scripter, I am more of a builder.
Well, You have PlayerAdded Functions, which only triggers when a player is added, and not on reset… Let me see what A fix can be, but it would be another function
Your script seems to only activate when a player joins the game. When a player resets, only their character resets, the player is readded, and thus the script won’t be activated.
I’m not sure if this is the best approach, but you can consider using
Can have really weird false positives and can trigger a ton causing lag. Like with an Anti-cheat system I had, The force field was acting weird when I tried that. So just be aware, but can be doable with finding if it is a character. Just can act weird
game.Workspace.ChildAdded:Connect(function(child)
if game.Players:FindFirstChild(child.Name) then
local player = game.Players:FindFirstChild(child.Name)
local playerId = player.UserId
end
end)