local raycastResult = workspace:Blockcast(cframe, self.Hitbox, self.Velocity * FRAMEDELTA, self.RaycastParams)
if raycastResult then
assert(self.RaycastParams.CollisionGroup ~= COLLISION_GROUPS["None"], "Somehow hit something when impossible.")
print("HIT")
self.StoppedDueToHit = true
self:StopShot()
return
end
The code should raise an error if the collisiongroup is == “ProjectileNone”
Not really. I tried to reproduce the issue to no avail. Quite strange. Perhaps you should investigate what was hit, and what its properties and collision group are.
Any chance the collisions with None are being enabled in a script?
Update. @SkrubDaNub just curious, what was the result of the raycast? Everything works perfectly in an empty place, so there must be a hidden detail in the code.
If the BaseParts that have their collision group set to ProjectileNone also have their CanCollide property set to false, setting their CanQuery property to false should make all raycasts ignore them
I think this is a situation where I’d recommend reorganizing your collision groups. BaseParts that you’d wish for raycasts to ignore should ideally be kept in a collision group separate from BaseParts that raycasts can detect
There is no separation. I simply want the blockcast to ignore all collisiongroups. (Though in hindsight, I might just do away with the raycast in the first place).
Actually, I’ll do just that. I’m just going to not do the raycast at all.