I'm Trying To Make A Script To Change The Shirt Color Of A Custom Character And Make It Save For That Server, But I Just Can't Seem To Get It Working. It's A Normal Server Script Located In ServerScriptService. It Doesn't Make Any Errors Of Any Kind Or Even Do Anything In General. I Just Can't Figure It Out. ;-;
B = {}
C = {}
game.Players.PlayerAdded:Connect(function(A)
table.insert(B,#B,Color3.fromRGB(math.random(1,255),math.random(1,255),math.random(1,255)))
table.insert(C,#C,A.Name)
end)
while wait(0.0000001) do
for i=1,#C do
Character = game.Workspace:FindFirstChild(C[i])
Character.Torso0.Color = B[i]
end
end
EDIT: I Got It Kinda Working But It Won't Stay When I Die.
B = {}
C = {}
game.Players.PlayerAdded:Connect(function(A)
table.insert(B,#B+1,Color3.fromRGB(math.random(1,255),math.random(1,255),math.random(1,255)))
table.insert(C,#C+1,A.Name)
end)
while wait(0.0000001) do
for i=1,#C do
local Character = game.Workspace:FindFirstChild(C[i])
Character.Torso0.Color = B[i]
end
end

1 comment
try adding a .died event and putting that for loop in it