I’m experiencing various problems with changing the players character model only from the default r15 to my own rig. I’m currently trying to do this by putting the model in starterPlayer.
I seem to spawn as the player although the camera is not following the model.
I cannot move but the idle animation I put in using the startercharacter scripts does work.
------[SERVER]------
local customChar : Model -- your model
customChar.Parent = workspace
player.Character = customChar
-- // isn't necessary but I'll wait till the next pre-physics step to make sure
RunService.Stepped:Wait()
local setNetworkOwnership(player, model)
for _, child in ipairs(model:GetDescendants()) do
if not (child:IsA("BasePart") and not child:IsGrounded()) then continue end
child:SetNetworkOwnership(player)
end
end
setNetworkOwnership(player, customChar)
Basically what you need is to set the character to the player and give the player network ownership of the char, so they can move it without lag in their screen. When you set the character to the player and the model is in workspace, the camera should automatically be locked onto the model’s humanoid. If it doesn’t you can listen on localPlayer.CharacterAdded event and customly set the focus of the camera to the model.
IsGrounded method checks if the BasePart is connected to a part through constraints that is anchored; or if itself is grounded