n_cy
(n_cy)
November 17, 2020, 3:16pm
#1
I don’t know why when I apply description 3 times my character dies
--When I equip
local descClone2 = Instance.new("HumanoidDescription")
if descCloneTable[userId] == nil then
descCloneTable[userId] = Players:GetHumanoidDescriptionFromUserId(userId)
end
descClone2.LeftArm = 1974612625
descClone2.RightArm = 1974614229
descClone2.LeftLeg = 1974615539
descClone2.RightLeg = 1974617530
descClone2.Torso = 1974619000
descClone2.HatAccessory = "1744246930,1744240420,88885069"
Humanoid:ApplyDescription(descClone2)
``
--When I unequip
if descCloneTable[userId] ~= nil then
Humanoid:ApplyDescription(descCloneTable[userId])
end
1 Like
grif_0
(not_grif)
November 17, 2020, 3:32pm
#2
Your creating a brand new humanoid description, which could be killing you. Try getting the applied description with Humanoid:GetAppliedDescription() instead of creating a new one
1 Like
n_cy
(n_cy)
November 17, 2020, 3:42pm
#3
I have this right now and same results
--When Equipped
local currentDescription = Humanoid:GetAppliedDescription()
currentDescription.LeftArm = 1974612625
--descClone2.RightArm = 1974614229
currentDescription.LeftLeg = 1974615539
currentDescription.RightLeg = 1974617530
currentDescription.Torso = 1974619000
currentDescription.HatAccessory = "1744246930,1744240420,88885069"
Humanoid:ApplyDescription(currentDescription)
--When unequipped
if descCloneTable[userId] ~= nil then
Humanoid:ApplyDescription(descCloneTable[userId])
end
n_cy
(n_cy)
November 17, 2020, 3:52pm
#4
I fixed it
if descCloneTable[userId] ~= nil then
local currentDescription = Humanoid:GetAppliedDescription()
currentDescription.HatAccessory = descCloneTable[userId]["HatAccessory"]
Humanoid:ApplyDescription(currentDescription)
end