CanCollide issue?

Hello everybody,

I have created a hole in the wall using parts. As I went to test this out, my character just slides through the part. I have made sure the parts CanCollide is set to true and anchored is set to true as well. Not to sure what else I should do to fix this?

image

I also discovered that when I crouch, it blocks me from going through. Any suggestions or help for me would be great.

image

2 Likes

Do you have any invisible parts around the hole? Can I also see the properties menu for all the parts?

2 Likes

Could the head of the character have CanCollide set to false?

For the crouching part, could I see a video of it?

Thanks!

2 Likes

Can you show us the properties menu?

3 Likes

Oops… Here you go

image

image

image

1 Like

It could be a problem with the crawling script.

1 Like

Are these the same things or different images?
image

The Folder is were I stored the parts which were the walls, inside the part I created a model for the wall with the hole in it. Then I placed those wall parts inside that model.

1 Like

Hmmmm.

As stated by @Crazedbrick1

It could be a problem with the crawling script.

There might be a problem with the crawling script.

1 Like

Sorry its been a while. Bit busy with some other stuff, I might show you my coding for the crawling as I heard it might be the coding that’s causing the issue. I have been using @GnomeCode awesome Teddy series for help on my new project.

Its a LocalScript stored in StarterCharacterScripts:

2 Likes

I think it’s HumanoidRootPart when you crouch make you blocks while on animation.
And you can go through hole while walking without animation is playing.

I believe is it HumanoidRootPart can make you block and you can’t enter the hole while animation is playing.

Try making HumanoidRootPart uncollide if I’m not wrong.
I also suggest close a hole little bit so you can’t go through when your walking when animation is not playing.

This is first solution I tried to send.

3 Likes

It’s because heads on character are automatically set to can collide = false.

Here’s a script to put in ServerScriptService to make them collidable:

--//Services
local Players = game:GetService("Players")

--//Functions
Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local HeadClone = Character.Head:Clone()
		HeadClone:ClearAllChildren()
		HeadClone.Transparency = 1
		HeadClone.CanCollide = true
		HeadClone.Parent = Character.Head
		
		local WeldConstraint = Instance.new("WeldConstraint")
		WeldConstraint.Part0 = Character.Head
		WeldConstraint.Part1 = HeadClone
		WeldConstraint.Parent = Character.Head
	end)
end)
2 Likes

Is the crouching script local or server?

Btw the head property is false by default

I believe then it should either be the script or the player’s hitbox. That’s the only 2 things i can come up with your problem.