Issue: Character colliding with ground in a falling state.
I’m beyond exhausted trying to find a solution with to this, the only thing I’ve found is to edit the character within lighting and parent it back to workspace once it’s loaded, However, that causes scaling to not replicate for other clients.
I really don’t know what to do to solve this and if it might be because of Humanoid Descriptions. Now I’m not sure if this is a scripting issue like I think it is, it could be an engine bug for all I know.
Gif:
https://gyazo.com/0d7b35db9fb76898992aec516df69907
Script:
Please keep in mind that :
- This may be messy since I’ve been trying to solve and testing it over and over again.
- The character models uses a custom head
- All data related things and equipping functions not shown have anything to do with this either.
function LoadCharacter(plr, DataTable)
warn(“Loading Character - New Method”)
repeat wait() until plr.Character
if DataTable.xpants then
DataTable = require(script.DataTransfer)(plr,DataTable)
elseif not DataTable.HD then
warn("No Humanoid Table")
DataTable = nil
return true
end
--vars
local char = plr.Character
local BodyReference = ServerStorage.Body_rigs.feminine
local HD
local Head
if DataTable.Masculine then
BodyReference = ServerStorage.Body_rigs.masculine
end
HD = BodyReference.Humanoid:FindFirstChildOfClass("HumanoidDescription"):Clone()
Head = BodyReference.Head:Clone()
--Setting up Base
if char:FindFirstChild('clothing_') then
char:FindFirstChild('clothing_'):Destroy()
end
StartContent.clothing_:Clone().Parent = char
for i,v in pairs (char.Humanoid:GetAccessories()) do
v:Destroy()
end
local skin = s2c(DataTable.SkinTone[1])
Head.Color = skin
HD.HeadColor = skin
HD.LeftArmColor = skin
HD.RightArmColor = skin
HD.RightLegColor = skin
HD.LeftLegColor = skin
HD.TorsoColor = skin
HD.GraphicTShirt = 0
HD.Pants = 0
HD.Shirt = 0
HD.BackAccessory = 0
HD.FaceAccessory = 0
HD.FrontAccessory = 0
HD.HairAccessory = 0
HD.HatAccessory = 0
HD.NeckAccessory = 0
HD.ShouldersAccessory = 0
HD.WaistAccessory = 0
--Applying values for humanoid description
for hdindex,hddata in pairs (DataTable.HD) do
HD[hdindex] = hddata
end
--Finalizing
char:WaitForChild("Humanoid"):ApplyDescription(HD)
char.Humanoid:ReplaceBodyPartR15("Head", Head)
--face
local FaceUI = ServerStorage.Face_rig.faceui:Clone()
FaceUI.Parent = char.Head
FaceUI.CanCollide = false
FaceUI.Transparency = 1
FaceUI.Size = Vector3.new(1.6, 1.681, 1.8)
FaceUI.CFrame = char.Head.CFrame * CFrame.new(0,0,-0.05)
FaceUI.wc.Part0 = FaceUI
FaceUI.wc.Part1 = char.Head
FaceUI = FaceUI:WaitForChild("ui"):WaitForChild("face")
FaceUI.eyes.Image = DataTable.Face.Eyes
FaceUI.mouth.Image = DataTable.Face.Mouth
FaceUI.extras.Image = DataTable.Face.Extras
FaceUI.eyebrows.Image = DataTable.Eyebrows
--hair
local function ApplyHairSpray(hairmodel)
if not DataTable.Hairsprays then return end
local Sides = {"Top", "Left","Right","Front","Back", "Bottom"}
for i = 1,6 do
local Decal = Instance.new("Decal")
Decal.Parent = hairmodel.Handle
Decal.Name = Sides[i]
Decal.Face = Sides[i]
if i == 1 then
Decal.Texture = DataTable.Hairsprays.Top
elseif i == 6 then
Decal.Texture = DataTable.Hairsprays.Bottom
else
Decal.Texture = DataTable.Hairsprays.Main
end
end
end
if DataTable.Hair then
if not HairsStorage:FindFirstChild(DataTable.Hair) then return end
local hair = HairsStorage[DataTable.Hair]:Clone()
hair.Parent = char
hair.Handle.Color = s2c(DataTable.HairColor)
ApplyHairSpray(hair)
end
--3D
local function CCLoadMutliple(savedname)
if DataTable[savedname] then
for objstr,colortab in pairs (DataTable[savedname]) do
local newmodel = ClothingStorage3D[savedname]:FindFirstChild(objstr):Clone()
newmodel.Parent = char.clothing_[savedname]
setupmod.clothes_rig_color(colortab, newmodel)
setupmod.clothes_rig(plr,newmodel)
end
end
end
local function CCLoadSingle(savedname)
if not DataTable[savedname] then return end
local objst = DataTable[savedname][1]
local colortab = DataTable[savedname][2]
if not objst then return end
local newmodel = ClothingStorage3D[savedname]:FindFirstChild(objst):Clone()
newmodel.Parent = char.clothing_[savedname]
setupmod.clothes_rig(plr,newmodel)
setupmod.clothes_rig_color(colortab, newmodel)
end
for i,v in pairs (char.clothing_:GetChildren()) do
if v.Name == "Hats" or v.Name == "Accessories" then
CCLoadMutliple(v.Name)
else
CCLoadSingle(v.Name)
end
end
--animations
char.Animate.idle.Animation1.AnimationId = DataTable.CCAnims.idle or "http://www.roblox.com/asset/?id=507766388"
if DataTable.Masculine then
plr.Character.Animate.walk.WalkAnim.AnimationId = StartContent.masculine.AnimationId
else
plr.Character.Animate.walk.WalkAnim.AnimationId = StartContent.feminine.AnimationId
end
--profile
setupmod.nametag(plr) --make it work with avatar data in the future
--finishing
for i,v in pairs (char:GetChildren()) do
if v:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(v, 'Players')
end
end
return true
end