#Humanoid.FloorMaterial

1 messages · Page 1 of 1 (latest)

broken gale
#

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.

elfin solstice
#

if your character is in the air or not

broken gale
#

yo you're so right

elfin solstice
broken gale
#

it is consistent until I morph... it's so weird

#

thx for the idea

elfin solstice
broken gale
#

I replace the player model with a new model and delete the old one

elfin solstice
broken gale
#

I do

elfin solstice
#

replacing your players model costs alot of perfomance especially if ya do it multiple times

desert laurelBOT
#

studio** You are now Level 1! **studio

broken gale
#

what do you recommend then

elfin solstice
#

clone your models and don't replace your players model

#

you just need to apply the cframes to each part in the model

broken gale
#

so am I overlapping the new model with the player model?

desert laurelBOT
#

studio** You are now Level 7! **studio

broken gale
#

ookay

elfin solstice
#

you just have to delete the models after you done morphing

#

or while you morph

broken gale
#

yeah

elfin solstice
#

to create that "effect"

broken gale
#

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

elfin solstice
#

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

broken gale
#

clone teh character being the new model or the player

elfin solstice
broken gale
#

ok

elfin solstice
#

player.Character

#

the player is not replicated in any way in the workspace

#

only the players character

broken gale
#

no sorry, I mean am I cloning the player model or the player model that I want to morph into

elfin solstice
#

the character model

#

from your player

broken gale
#

ok

#

it errors

#

newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)

this line returns nil

elfin solstice
#

show the whole code

broken gale
#

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

elfin solstice
#

-- Sets player model to new model and parents to Workspace --
player.Character = newCharacter

dont do this

broken gale
#

ok

elfin solstice
broken gale
#

they do

elfin solstice
#

can you screenshot the error

desert laurelBOT
#

studio** You are now Level 2! **studio

broken gale
#

newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame)

this line is erroring

elfin solstice
#

maybe try newCharacter:SetPrimaryPartCFrame(oldCharacter:FindFirstChild("PrimaryPart").CFrame)

broken gale
#

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

elfin solstice
#

and apply a humanoid description on that model of yourself

#

you cant clone the players character directly for some reason

broken gale
#

so... clone the player model, add a humanoid to it?

elfin solstice
#

and clone that

broken gale
#

okaay

#

I'm using the default model tho

elfin solstice
#

apply your humanoid description on that clone characters humanoid

elfin solstice
broken gale
#

I did and tried sending it over to server storage and it errored

elfin solstice
#

you just have to clone it

#

don't send it anywhere

#

store it in rep storage or server storage

broken gale
#

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

elfin solstice
#

that doesnt work

#

you have to clone from rep storage or server storage into workspace

broken gale
#

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

elfin solstice
broken gale
#

parent what to workspace 😭

elfin solstice
#

the character clone

#

then set its primarypart cframe to your characters primary part cframe

broken gale
#

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

elfin solstice
broken gale
#

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?

broken gale
#

like- I can't move them

elfin solstice
#

move so it goes to a certain position

broken gale
#

broo what?????????

elfin solstice
#

be more specific

broken gale
#

did you minsuderstand what my goal was here??

#

I want to change the player's appearance to different characters

elfin solstice
#

ohhh

broken gale
#

Dx

elfin solstice
#

omg

desert laurelBOT
#

studio** You are now Level 3! **studio

elfin solstice
#

yeah just use humanoid descriptions gang ✌️

#

its super duper easy

broken gale
#

idk what those are

#

do I shove the player humanoid into the model?

elfin solstice
#

its basically the appearance of your character

elfin solstice
broken gale
#

no I have a modeled character that I want to swap to

elfin solstice
#

lemme show you

broken gale
#

yeah exactly like that

elfin solstice
#

yes use humanoid descriptions

broken gale
#

do those add decals and items to the character?

elfin solstice
#

and apply them on your humanoid

elfin solstice
#

like a bracelet

#

you just have to add it in the humanoid description

broken gale
#

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?

elfin solstice
#

doesn't matter as long as the custom model has a humanoid

broken gale
#

oh?

elfin solstice
#

you just need a humanoid and your wanted humanoid description

broken gale
#

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

elfin solstice
#

this is how I did it

#

just get your characters humanoid your humanoid description and then apply

broken gale
#

ok-

#

give me a sec

elfin solstice
#

easy to figure out

#

this is how I stored and accesed them

broken gale
#

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

elfin solstice
#

read the documentation

broken gale
#

oh do I need to get the humanoid from the model?

elfin solstice
broken gale
#

where are you getting "HumanoidDescriptions" from on the second line?

#

it's unknown for me

elfin solstice
#

from rep storage i store them there

broken gale
#

oh gotchu

elfin solstice
#

i just clone them and then apply the cloned description on the humanoid

broken gale
#

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

elfin solstice
#

alr bet