Having some HUUUGE issues with collisions. I have a blood script that affects my ragdoll script because it collides with the player. Flinging them pretty hard. So my wonderful solution is a collision group
``` local PhysicsService = game:GetService("PhysicsService")
local Characters = {"a", "b", "c", "d", "e", "f", "g", "213", "asd123","2","2222","3214","2v","21gbv","214jhklsf","sahgui214hh","34fdsg","sdafgdsh","xgwsdhjb" }
local RandomNumber = math.random(#Characters)
local String = ""
local String2 = ""
for i=1, 10 do
String = String.. "" ..Characters[math.random(1,#Characters)]
String2 = String.. "" ..Characters[math.random(1,#Characters)]
end
print(String)
local pood = String
local pood2 = String2
local obstacles = pood
local greenObjects = pood2
PhysicsService:CreateCollisionGroup(obstacles)
PhysicsService:CreateCollisionGroup(greenObjects)
local function bruh()
local function setCollisionGroup(character, groupName)
for _, child in ipairs(character:GetChildren()) do
if child:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(child, pood2)
end
end
character.DescendantAdded:Connect(function(descendant)
if descendant:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(descendant, pood)
end
end)
PhysicsService:CollisionGroupSetCollidable(greenObjects, obstacles, false)
game:GetService("Debris"):AddItem(greenObjects, .01)
game:GetService("Debris"):AddItem(obstacles, .01)
end
end ```
This is what i have for a part of my script. I just need to know how to delete the collision group after .01 seconds of creation.
the above does not work. Thank you.
edit
I’ve been at this for a very long time and it is 2 in the morning. I’m going to get some rest. I will be back tomorrow to respond.
I have the same question but it’s sad no one replied to your topic. I just want to remove the collision group from game so I can make way for others and they don’t fill up their limit. This way I’ll be able to make temporary collision groups.
Sure, a part can only belong to one group at a time so changing its collision group to “Default” or any other will remove it from that collision group. So, you don’t need to create multiple groups and delete them. Making collision a lot of collision groups isn’t bad but it’s better if you can figure out how to keep things in existing ones rather than creating more.
what you can do i suppose is create a default collision group which harbors all baseparts in the scene then add the collision group you created to that instead of “deleting” it
Why don’t you just make the blood not collideable able in the first place, it’s probably faster than creating a new collision group and I can’t find a reason to make blood collideable with well, anything in the first place.
Creates collision issues. The way the blood works is it fires out a part at an arc and waits until it hits the ground to create them. If i make it no collide it goes through the ground sometimes.