The problem: The Humanoid displays the correct information yet "Enum.Material.Air" is constantly being printed. Only occurs after a morph. Any solutions? I don't believe using this method to check if the player is grounded is mandatory, I just need a reliable system to know when the player is on the ground so lmk if there's a more effective way to do this.
#Humanoid.FloorMaterial
1 messages · Page 1 of 1 (latest)
check with a raycast
if your character is in the air or not
yo you're so right
the humanoids floor material has always been consistent for me tho pretty weird that it is not for you 🤔
how do you morph
I replace the player model with a new model and delete the old one
why don't you just clone your model 🙏
I do
replacing your players model costs alot of perfomance especially if ya do it multiple times
** You are now Level 1! **
what do you recommend then
clone your models and don't replace your players model
you just need to apply the cframes to each part in the model
so am I overlapping the new model with the player model?
** You are now Level 7! **
yeah
ookay
yeah
to create that "effect"
luau
-- Model Setup --
local oldCharacter = player.Character
local newCharacter = ServerStorage.CharacterModels:FindFirstChild(characterName):Clone()
newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)
newCharacter.Name = player.Character.Name
-- Sets player model to new model and parents to Workspace --
oldCharacter:Destroy()
player.Character = newCharacter
newCharacter.Parent = workspace
-- Script Setup --
local charSetup = ServerScriptService.CharacterScripts:FindFirstChild(characterName).Setup:Clone()
local charMoveset = ServerScriptService.CharacterScripts:FindFirstChild(characterName).Moveset:Clone()
-- Parents cloned characters to player --
charSetup.Parent = player.Character
charMoveset.Parent = player.Character
oh that didn't work, but here's the current code setup
do it rather like this
local character_model = player.Character
local character_clone = character_model:Clone()
and then apply the other code
and don't make this
player.Character = somemodel
just clone
you character
will be better for perfomance
and feel smoother
clone teh character being the new model or the player
the model of your character
ok
player.Character
the player is not replicated in any way in the workspace
only the players character
no sorry, I mean am I cloning the player model or the player model that I want to morph into
ok
it errors
newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)
this line returns nil
show the whole code
local SetupModule = {}
-- Service Setup --
local ServerStorage = game:GetService("ServerStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local StarterPlayer = game:GetService("StarterPlayer")
local StarterPack = game:GetService("StarterPack")
function SetupModule.characterSetup(player, characterName)
-- Model Setup --
local oldCharacter = player.Character:Clone()
local newCharacter = ServerStorage.CharacterModels:FindFirstChild(characterName):Clone()
newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)
newCharacter.Name = player.Character.Name
-- Sets player model to new model and parents to Workspace --
player.Character = newCharacter
newCharacter.Parent = workspace
-- Script Setup --
local charSetup = ServerScriptService.CharacterScripts:FindFirstChild(characterName).Setup:Clone()
local charMoveset = ServerScriptService.CharacterScripts:FindFirstChild(characterName).Moveset:Clone()
-- Parents cloned characters to player --
charSetup.Parent = player.Character
charMoveset.Parent = player.Character
end
-- Sets player model to new model and parents to Workspace --
player.Character = newCharacter
dont do this
ok
check if newcharacter and oldcharacter if the model of them have an primary part set
they do
can you screenshot the error
** You are now Level 2! **
newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)
this line is erroring
yeah the primary part doesn't exist or isn't set
maybe try newCharacter:SetPrimaryPartCFrame(oldCharacter:FindFirstChild("PrimaryPart").CFrame)
so- that only happens when I clone the character model.
ok ok ok
so the new model has a primary part
but when I clone the player model it doesn't work anymore
yeah mb that does not work you have to have a model in server storage
and apply a humanoid description on that model of yourself
you cant clone the players character directly for some reason
so... clone the player model, add a humanoid to it?
no have a character model in server storage or replicated storage
and clone that
apply your humanoid description on that clone characters humanoid
ya just clone that
I did and tried sending it over to server storage and it errored

you just have to clone it
don't send it anywhere
store it in rep storage or server storage
yo you're making no sense
don't send it anywhere but store it in rep or server storage???
I'm cloning the model from workspace

that doesnt work
you have to clone from rep storage or server storage into workspace
am I cloning the DEFAULT character model or the NEW character model that I'm morphing into.
If I get the DEFAULT character model I have to clone it from WORKSPACE.
If it's the NEW character model then I already get it from ServerStorage.
how do I clone something from storage if it automatically spawns in workspace
you have to parent it first to workspace
parent what to workspace 😭
the character clone
then set its primarypart cframe to your characters primary part cframe

can you just
like
send over a code sample it's still erroring when I try parenting the cloned character model
like if I try to do anything to it, the code errors
I can't even rename it
yeah gimme a min
ok so I had to turn on archivable
so, this is the current situation
both are clones, left is old, right is morph. I cannot control either one
do I have to insert smthn?
wdym by control
like- I can't move them
wdym by move them?
move so it goes to a certain position
broo what?????????
be more specific
did you minsuderstand what my goal was here??
I want to change the player's appearance to different characters
ohhh
Dx
omg
** You are now Level 3! **
its basically the appearance of your character
no you apply a humanoid description on the humanoid
no I have a modeled character that I want to swap to
yeah exactly like that
yes use humanoid descriptions
do those add decals and items to the character?
and apply them on your humanoid
yeah even models
like a bracelet
you just have to add it in the humanoid description
aaaah no that's not quite it
I've got a custom model that I made
is there a way for me to do something similar with that?
doesn't matter as long as the custom model has a humanoid
oh?
you just need a humanoid and your wanted humanoid description
local oldCharacter = player.Character
oldCharacter.Archivable = true
oldCharacter.Parent = ServerStorage
local clonedCharacter = oldCharacter:Clone()
local clonedHumanoid = oldCharacter:FindFirstChild("Humanoid")
local newCharacter = ServerStorage.CharacterModels:FindFirstChild(characterName):Clone()
clonedHumanoid.Parent = newCharacter
newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)
newCharacter.Name = player.Character.Name
-- Sets player model to new model and parents to Workspace --
newCharacter.Parent = workspace
-- Script Setup --
local charSetup = ServerScriptService.CharacterScripts:FindFirstChild(characterName).Setup:Clone()
local charMoveset = ServerScriptService.CharacterScripts:FindFirstChild(characterName).Moveset:Clone()
-- Parents cloned characters to player --
charSetup.Parent = player.Character
charMoveset.Parent = player.Character
current setup
no idea what to change to make it do what you just said
this is how I did it
just get your characters humanoid your humanoid description and then apply
okay I'm getting an error :/
function SetupModule.characterSetup(player, characterName)
local characterModel = ServerStorage.CharacterModels:FindFirstChild(characterName)
if characterModel ~= nil then
local playerModel = player.Character
local humanoid = playerModel:FindFirstChild("Humanoid")
humanoid:ApplyDescription(characterModel)
end
end
Here's the setup
humanoid:ApplyDescription(characterModel)
This line is erroring
you are applying a model and not humanoid description
read the documentation
oh do I need to get the humanoid from the model?
yes
where are you getting "HumanoidDescriptions" from on the second line?
it's unknown for me
from rep storage i store them there
oh gotchu
i just clone them and then apply the cloned description on the humanoid
yeah...
errm ok I lowkey have no idea what I'm doing
function SetupModule.characterSetup(player, characterName)
local characterModel = CharacterModels:FindFirstChild(characterName)
local characterHumanoid: Humanoid = player.Character:FindFirstChild("Humanoid")
local WantedHumanoidDescription: string = characterModel:FindFirstChild("Humanoid")
local FoundHumanoidDescription: HumanoidDescription = CharacterModels:FindFirstChild(WantedHumanoidDescription)
if FoundHumanoidDescription ~= nil then
local Character = characterHumanoid.Parent
end
characterHumanoid:ApplyDescription(FoundHumanoidDescription)
end
I'm trying to modify the code cuz I don't have the same parameters as you but it's not working
characterHumanoid:ApplyDescription(FoundHumanoidDescription)
says the argument is missing as there's no string value. an instance is being passed??
I'll figure this out later, thanks for the help tho! I gotta sleep
alr bet