I want to change the default character model to a custom one using a LocalScript. I’ve tried destroying the character and then setting the character to the custom one but that doesn’t work. Player:LoadCharacter() also doesn’t work since it only works in server scripts. Anyone got any ideas on how to do this?
What’s in your custom character model?
And honestly I don’t think it it will work using LocalScript. Is it possible for you to use server?
No, unfortunately it must be done locally.
Ok, this works on default R6 Dummy.
-- :: Define the new character
local newCharacterOriginal = game.ReplicatedStorage.Dummy
-- :: Hide previous character
local oldCharacter = game.Players.LocalPlayer.Character
oldCharacter.Parent = nil
game.Players.LocalPlayer.Character = nil
-- :: Copy new character
newCharacter = newCharacterOriginal:Clone()
newCharacter.Parent = workspace
-- :: Set the new character
game.Players.LocalPlayer.Character = workspace.Dummy
workspace.CurrentCamera.CameraSubject = workspace.Dummy.Humanoid
It should work on your rig too.
Btw try to rename your Root
to HumanoidRootPart
2 Likes
I suggest you use a remote event if you want to change the character on the client side. Here is my example:
--- Client-side
local remote = --- Get ur remote event here
Button.MouseButton1Down:Connect(function()
remote:FireServer()
end
--- Server-side
local remote = --- Get ur remote event here
remote.OnServerEvent:Connect(function(player)
local model = --- Get your model here
local CloneModel = model:Clone()
player.Character = CloneModel
player.Character.Parent = game.Workspace
end
1 Like
Yes, it will not work in client side, unless you use remote event
Believe me, I would use the server if I could but in this case I can’t lol. Thanks anyways though.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.