Hey guys. So, as you probably know, .Touched events only work when the player touches the part, and it doesn’t actually register if the player is inside of the part. I’ve done some research to try and see how I could make a .Touched event register even if the player is inside of the part, and I’ve gotten some results. However, because the Dev Hub is well, the Dev Hub
, this is the only thing I have.
local PhysicsService = game:GetService("PhysicsService")
local Metal = script.Parent.Metal
local Brick = script.Parent.Brick
local MetalCollisionGroup = "Metal CG"
local BrickCollisionGroup = "Brick CG"
PhysicsService:RegisterCollisionGroup(Metal)
PhysicsService:RegisterCollisionGroup(Brick)
Metal.CollisionGroup = MetalCollisionGroup
Brick.CollisionGroup = BrickCollisionGroup
PhysicsService:CollisionGroupSetCollidable(MetalCollisionGroup, BrickCollisionGroup, false)
print(PhysicsService:CollisionGroupsAreCollidable(MetalCollisionGroup, BrickCollisionGroup))
Yep. That’s literally it. Thanks a lot Dev Hub
. I’ll be super grateful if you can help with this!
(I couldn’t find anything else, so if there are other things I can do, or that I am trying to use incorrectly, please let me know.)