Player has can collide off but not falling through the ground

ok so basically im making an obby but instead of the lava killing you, i want to make it so that the player becomes uncollideable and falls through the map

this is my code for the lava block (it is serverscript, pareneted under the lava part)

local part = script.Parent

part.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild('Humanoid') then
		for i,v in pairs(hit.Parent:GetDescendants()) do
			if v:IsA('BasePart') then
				v.CanCollide = false
				
			end
		end
	end
end)

this works… but not really. let me explain.
after the player has touched the lava, it doesn’t fall through the map. however, it can go through walls, but the player won’t fall through the ground


in this picture the red is the lava, the parts I colored green are the parts the player can go through after touching the lava, and the yellow is the part the player cannot go through after touching the lava.

HELP PLEASE

Try disabling CanTouch at the same time.

1 Like

Did you turn off CanCollide on the black part? I cannot tell if the black part is part of your Bobby.

1 Like

Sorry I meant to ask if you turned off CanCollide on the black part.

1 Like

You can’t set can-collide off for the player’s body parts. why would you want to set can-collide for the player’s body parts off anyways? can you not just set can-collide off for the parts through a local script? you should also try looking into collision groups (server-script)

1 Like

I’m pretty sure you could create a custom Collision Group that has no collision with anything, then you could set the Part’s collision groups to that one you created.

The Humanoid in the player always makes the player have collision, but don’t delete the Humanoid because then the player will just die.

1 Like

i think changing cancollide of a part via local script would be easier to do

when in doubt, find a simpler way out :speaking_head: :fire:

1 Like

ok then I think I will just do that instead

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.