how can I make the character change to a custom rig I made with script?
1 Like
you can change the character of a player by setting the Character property of the player to your model
player.Character = YourCustomModel
2 Likes
i tried that it did nothing and it bugs out my camera and cant move the character, here is my code:
local newModel = Models.BombCharacter:Clone()
newModel.Name = Player.Name
Character:Destroy()
newModel.Parent = game.Workspace
newModel:SetPrimaryPartCFrame(CFrameSet)
Character = newModel
for _, object in ipairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
if object.Name == "Momentum" then continue end
if object.Name == "Actor" then continue end
if object.Name == "MovementInit" then continue end
if object.Name == "Tilting (R6)" then continue end
if object.Name == "RagdollR6" then continue end
if object.Name == "Bouncy Surfaces" then continue end
if object.Name == "Voting Handler" then continue end
if object.Name == "Animate" then continue end
local newObject = object:Clone()
newObject.Parent = newModel
end
Don’t forget to save the position of the character beforehand and then set the new character to that position