Oh yea sorry, it’s my first topic but I didn’t make myself clear what I meant by this topic is that is there an easy way to call it. I’m not asking for my code to be fixed. I’m more asking in what way could I call it.
local PhysicsService = game:GetService("PhysicsService")
-- Create collision group
PhysicsService:CreateCollisionGroup("group1")
-- Add an object to each group
PhysicsService:SetPartCollisionGroup(instance, "group1")
tbh its pretty basic just remeber everytime you call it the group it must be a string
local PhysicsService = game:GetService("PhysicsService")
-- Create collision group
local group1 = "group1"
PhysicsService:CreateCollisionGroup(group1)
-- Add an object to each group
PhysicsService:SetPartCollisionGroup(instance, group1)
you could do this if you dont want to add “” but really to add a part you would just use setpartcollsiongroup
if you wanted to really make it simple you would just add a function for it
local PhysicsService = game:GetService("PhysicsService")
-- Create collision group
PhysicsService:CreateCollisionGroup("group1")
--function
local function SetCollision(part)
PhysicsService:SetPartCollisionGroup(part, group1)
end
-- to add an object just
SetCollision(object)
the basic thing is that the part is an instance that can be in a collision group
i know that i didn’t need to make this long but i did so i hope i helped