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

[EASY] - Need help swapping character models?

Asked by 9 years ago
local CharModel = game.Workspace.Explosive:Clone()

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        char:Destroy()
        print("Mwahahahahaha")
        char = CharModel
    end)
end)

Basically, I want the player joining to have his/her character destroyed and the character being changed to CharModel, the variable for a model named Explosive (which has a humanoid and head in it.)

However, when I test it.. It shuts my game down on joining.

1 answer

Log in to vote
0
Answered by 9 years ago

Instead of your current code inside of CharacterAdded, try this.

local nchar = CharModel:Clone();
nchar.Parent = workspace;
nchar:MakeJoints();
player.Character = nchar;
char:Destroy();

That might work a little better.

Ad

Answer this question