Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- updated 30-09-2014
- my version of the loadcharacter script
- replace values if you want to
- programmed by NewtPewt
- ]]--
- local characterappearancestore = {}
- function storecharacterappearance(player)
- storedappearance = {
- characterappearance = {},
- hats = {}
- }
- for i,v in ipairs(character:getchildren()) do
- if v:isa("characterappearance") then
- table.insert(storedappearance.characterappearance, v)
- end
- if v:is("accoutrement") then
- table.insert(storedappearance.hats, v)
- end
- end
- characterappearancestore[player] = storedappearance
- end
- function restorecharacterappearance(player)
- player:clearcharacterappearance()
- local storedappearance = characterappearancestore[player]
- for i,v in ipairs(storedappearance.hats) do
- v.parent = player.character
- end
- end
- function playerspawn(character)
- local player = game.players:getplayerfromcharacter(character)
- storecharacterappearance(player)
- end
- function playeradded(player)
- player.characteradded:connect(playerspawn)
- end
- game.players.playeradded:connect(playeradded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement