Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this stop working after I respawn even though its a CharacterAdded function?

Asked by
LawlR 182
7 years ago
01game.Players.PlayerAdded:Connect(function(plr)
02    plr.CharacterAdded:Connect(function(chr)
03        repeat wait(.1) until chr:IsDescendantOf(game.Workspace)
04 
05        --Shirt
06        if chr:FindFirstChild("Shirt") == nil then
07            local shirt = Instance.new("Shirt",chr)
08            shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=132601069"
09        elseif chr:FindFirstChild("Shirt") then
10            chr.Shirt:Destroy()
11            local shirt = Instance.new("Shirt",chr)
12            shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=132601069"
13        end
14 
15        --Pants
View all 36 lines...

It works when I press play but then if I reset, it only sets the pants and shirt, and doesn't get rid of the accessories nor makes my head blue. Why?

0
yeah my post was about the appearance too LuckiestJade -5 — 7y
0
output errors? Le_Teapots 913 — 7y
0
Nope. No output errors. LawlR 182 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Make sure you're character auto loads is set to false

0
your* LuckiestJade -5 — 7y
0
StarterPlayer properties LoadCharacterAppearance shouldn't be ticked. LuckiestJade -5 — 7y
0
Nvm I fixed it. Just made it wait a bit longer. LawlR 182 — 7y
0
But yeah you just reminded me about LoadCharacterAppearance. I'm gonna un-tick that now. LawlR 182 — 7y
0
Exacly, LoadCharacter() respawns your character instantly, as I stated clearly. Np LuckiestJade -5 — 7y
Ad

Answer this question