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.
make a new collison group that can collide with the players and the enemies and assign said collison group to the map then make another that can only collide with the map set every limb of the enemy to the collison group that cant collide with the player i had the same issue with an after image dash system i made thats just how humanoids work. your script can look smth like this
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
Enemy.Head.CollisonGroup = your group here
print("Head")
end
if Enemy.LeftArm.CanCollide == true then
Enemy.LeftArm.CanCollide = false
Enemy.LeftArm.CollisonGroup = your group here
print("Left Arm")
end
if Enemy.LeftLeg.CanCollide == true then
Enemy.LeftLeg.CanCollide = false
Enemy.LeftLeg.CollisonGroup = your group here
print("Left Leg")
end
if Enemy.Torso.CanCollide == true then
Enemy.Torso.CanCollide = false
Enemy.Torso.CollisonGroup = your group here
print("Torso")
end
if Enemy.RightArm.CanCollide == true then
Enemy.RightArm.CanCollide = false
Enemy.RightArm.CollisonGroup = your group here
print("Right Arm")
end
if Enemy.RightLeg.CanCollide == true then
Enemy.RightLeg.CanCollide = false
Enemy.RightLeg.CollisonGroup = your group here
print("Right Leg")
end