How Do I Permanently Change A Players Character Properties With A Script?

Hello! This is my second post on the forums, and I got stuck on something and would like to know if any of you can help.

So basically I have a script that changes A players Character Transparency to 0.5 When They Join The Game

This Is The Script, In ServerScriptService

game.Players.PlayerAdded:connect(function(plr)
repeat wait() until plr.Character

local Character = plr.Character

for _, v in pairs(Character:GetDescendants()) do

	if  v:IsA("BasePart") then
		
		
		v.Transparency = 0.5



	end

end

	end)

However, when you reset or die, the players character and accessories transparency reverts back to 0 or its normal transparency value. Is there a way I can permanently Change a players transparency to 0.5 Even when they die?

2 Likes

Yeah!
Just check when the humanoid dies with

Character.Humanoid.Died:Connect(function()
—change their transparency
end)

sorry for the constant edits, just trying to format the code

1 Like

Thanks A lot I had a feeling I may had to do that!

1 Like

I just realized that my code only detects when the player dies, but it doesn’t detect when they respawn, so you might find use of the player.CharacterAdded event to detect when they respawn.

1 Like

Alright I’ll try that thank you

1 Like

Thank you so much CharacterAdded Works Perfectly Script Is working how i intended to now

2 Likes