Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

which is the best way to change the player character?

guys, im making a body changer script, in my game exist two races, and for one of that races i want change player body, i made a script before what work in R15, but when i made my game R6 this script doesnt work anymore, can some of u see whats wrong with my script?

if race.Value == "gillian" then
            for _,v in pairs(char:GetChildren()) do
                if v:IsA("BasePart") then
                    v:Destroy()
                elseif v:IsA("Accessory") then
                    v:Destroy()
                end
            end
            for _, x in pairs(gillian:GetChildren()) do
                if x:IsA("BasePart") then
                    local y = x:Clone()
                    y.Parent = char
                end
            end
            
        end

its the main part of the script, the changer part which is the best way to change the player character? like i want, a way to change depending to the player race

1 answer

You can do like:

if race.Value == "gillian" then
	player.Character = gillian
end

1 comment

0

rlly? i dont think it work, ive tried and nothing

This discussion is preserved as it was. New answers, comments, and votes are closed.