This script is inside a part
--SERVICES local PhysicsService = game:GetService('PhysicsService') --VARIABLES local Part = script.Parent --CREATE COLLISION local PartGroup = "PartGroup" PhysicsService:CreateCollisionGroup(PartGroup)
You can only create 'PartGroup' once. If the group already exists, the output would return a error.
Create a separate script that creates collision groups:
--CREATE COLLISION local PhysicsService = game:GetService('PhysicsService') local PartGroup = "PartGroup" PhysicsService:CreateCollisionGroup(PartGroup) PhysicsService:CollisionGroupSetCollidable(PartGroup, PartGroup, false) -- sets the group uncollidable with itself
Part script:
--SERVICES local PhysicsService = game:GetService('PhysicsService') --VARIABLES local Part = script.Parent PhysicsService:SetPartCollisionGroup(Part, 'PartGroup') -- requires a part and the name of the collision group