I’m having a problem with the morph/load custom character script. It clones the model needed, however, can’t clone it to the player’s CFrame. Any help is appreciated
function Egg:LoadChar(egg)
local newEgg = egg:Clone()
newEgg.EggMesh.Anchored = false
newEgg:SetPrimaryPartCFrame(self._character.PrimaryPart.CFrame)
self._character = newEgg
newEgg.Parent = workspace
end
newEgg, created in the function, is the models clone. Egg is a parameter passed by other functions and newEgg.PrimaryPart is the primary part of the new egg I just created
local d = workspace.dummy
local c = game.Players.The_flyingMan716.Character --doesn't work
c = d
local d = workspace.dummy
local p = game.Players.The_flyingMan716--work
p.Character = d
because you say that self._character is equal to character. This will not work. I need to set to player.Character = model directly for it work. Under player instance has a property call player.Character
Hello, everybody. I made some more changes to my loading custom character script, yet it doesn’t get loaded and the player’s camera is looking nowhere
function Egg:LoadChar(egg)
local character = self._player.CharacterAdded:Wait()
local NewCharacter = egg:Clone()
NewCharacter:SetPrimareyPartCFrame(character.PrimaryPart.CFrame)
NewCharacter.Name = self._player.Name
character = NewCharacter
NewCharacter.Parent = workspace
end