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

how to set the character of a player?

Asked by 5 years ago

i cant figure out how to copy a character to a player

    local plr = game.Players.LocalPlayer
    local m = game.ServerStorage.Pets.Husky.StarterCharcter:Clone()
    m = plr

this code does not work and i do not know why

0
You'd do m.Parent = workspace and then assign plr.Character = m. Though you wouldn't be able to control the character. User#19524 175 — 5y
0
Thanks! bobyjones177 4 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

This will not work for several reasons, firstly you are setting the variable m to the player, it should be the other way around, secondly you are trying to directly set the player object instead of the character property inside the player object, it should look more like:

plr.Character = m
0
It should also be m.Parent = game.Workspace or smth mixgingengerina10 223 — 5y
0
^ yeah because the m's parent wasn't assigned User#19524 175 — 5y
0
^Don't forget to do this as well. As a side note, if you want the character to be able to move you need a humanoid object inside the model with a part named HumanoidRootPart (optional but preferred: set the model's PrimaryPart to the HumanoidRootPart) awesomeawesxomeman3 15 — 5y
Ad

Answer this question