Hello
When I set character’s feet (R15) to CanCollide = true, what causes them to become again CanCollide=false and how can I avoid this?
Thanks
Hello
When I set character’s feet (R15) to CanCollide = true, what causes them to become again CanCollide=false and how can I avoid this?
Thanks
They shouldn’t
Unless you have another external script interfering with them
There are no other scripts added by me, which can change CanCollide of the legs.
I make it false in CharacterAdded event in a LocalScript.
May be some of the system scripts does something later?
Humanoids make the legs and arms and head have no collision for some reason, a fix for this is to make an invisible part the same size and position as the feet and weld them together. For an example (if the script were to be in StarterCharacterScripts):
local Character = script.Parent
local leftfoot = Character.LeftFoot -- left foot
local rightfoot = Character.RightFoot -- right foot
local fakeleftfoot = Instance.new("Part") -- Make a left foot collider
fakeleftfoot.Name = "FakeLeftFoot"
fakeleftfoot.CFrame = leftfoot.CFrame
fakeleftfoot.Size = leftfoot.Size
fakeleftfoot.Transparency = 1
fakeleftfoot.CanCollide = false -- getting changed after so it is inside the foot
fakeleftfoot.Parent = Character
local fakerightfoot = Instance.new("Part") -- a right food collider
fakerightfoot.Name = "FakeRightFoot"
fakerightfoot.CFrame = rightfoot.CFrame
fakerightfoot.Size = rightfoot.Size
fakerightfoot.Transparency = 1
fakerightfoot.CanCollide = false
fakerightfoot.Parent = Character
local leftfootweld = Instance.new("WeldConstraint") -- left foot weld
leftfootweld.Part0 = leftfoot
leftfootweld.Part1 = fakeleftfoot
leftfootweld.Parent = fakeleftfoot
fakeleftfoot.CanCollide = true
local rightfootweld = Instance.new("WeldConstraint") -- right foot weld
rightfootweld.Part0 = rightfoot
rightfootweld.Part1 = fakerightfoot
rightfootweld.Parent = fakerightfoot
fakerightfoot.CanCollide = true
This can be applied to the legs or arms but keep in mind that if the feet are not both touching the ground, walking can be weird.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.