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
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?
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.
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.