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

Inserting 'Body Color' etc... Not working when player respawns?

Asked by
PastDays 108
5 years ago
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        character.Humanoid.WalkSpeed = 0
        character.Humanoid.JumpPower = 0
        wait(1)
        character.Shirt:remove()
        character.Pants:remove()
        character["Body Colors"]:remove()
        wait()
        local Colour = script["Body Colors"]:clone()
        Colour.Parent = character
    end)
end)

The script fires and it all works perfectly on enter but when they reset it doesnt fire, Any solutions?

1
Use :Destroy() instead of :remove() since :remove() is deprecated. poke7667 142 — 5y
0
i thought it was the otherway around for some reason. PastDays 108 — 5y
1
It's also Clone not clone. And Connect not connect User#19524 175 — 5y
0
Im sure that makes no difference. PastDays 108 — 5y
View all comments (2 more)
0
They are deprecated and should not be used in new work. http://robloxdev.com/articles/Deprecation it can be removed at anytime. User#19524 175 — 5y
0
I've Replaced them all, So no more depreciated words. PastDays 108 — 5y

Answer this question