CanCollide not working

I am using Evercyan RPG Kit and his Enemys (Mobs) always collide with the player. and can sometimes lead to glitching and clipping through walls. enemies parts CanCollide is false so I assumed I would have to use a script in order to fix it. I made the script and they still Collide with the player is there something I’m missing?

Here is my script:

local Head = Enemy.Head
local Torso = Enemy.Torso
local LeftArm = Enemy.LeftArm
local LeftLeg = Enemy.LeftLeg
local RightArm = Enemy.RightArm
local RightLeg = Enemy.RightLeg

if Enemy.Head.CanCollide == true then
	Enemy.Head.CanCollide = false
	print("Head")
end

if Enemy.LeftArm.CanCollide == true then
	Enemy.LeftArm.CanCollide = false
	print("Left Arm")
end

if Enemy.LeftLeg.CanCollide == true then
	Enemy.LeftLeg.CanCollide = false
	print("Left Leg")
end

if Enemy.Torso.CanCollide == true then
	Enemy.Torso.CanCollide = false
	print("Torso")
end

if Enemy.RightArm.CanCollide == true then
	Enemy.RightArm.CanCollide = false
	print("Right Arm")
end

if Enemy.RightLeg.CanCollide == true then
	Enemy.RightLeg.CanCollide = false
	print("Right Leg")
end
2 Likes

he must have added some sort of script or something to hardwire cancollide to true. You’ll have to check all the scripts in the enemies to fix this.

I have checked the mob’s script and the scripts in serverscriptservice and can’t find anything to do with the mobs CanCollide would i have to add another script into serverscriptservice?

As I know, collisions can’t really be changed with a Humanoid.

As you see, I have disabled the collisions. But if I run:

it will redo the properties unless the humanoid is destroyed.

One thing you can do is make Collision groups.

You can use this wiki information to help you out!

(You can disable Player Collisions. This wiki can help you with that as well)

I hope it helps!

It is possible that it should be: game.Workspace.Enemy.Head.CanCollide = false
with game.Workspace seeing as though it would probably in the workspace.

Hope it helps!

Use RunService or a while loop to make the CanCollide property be changed to false / true (whatever you want) every single frame rendered or every second or amount of wait time. This is also the recipe for NoClip that exploiters use.

Can’t you just use PhysicsService to disable the collision between the players and the mobs?

1 Like

I’m not really sure what PhysicsService does?

sometimes but he should check his variables