Collision groups not working?

Hello, Currently Im trying to make a football throw system, but Im trying to change the collision groups because when i throw it it collides with the player so I made a script that sets the players parts to that collision group. The characters shouldn’t collide with the group “Football” but it does. Here’s the Groups

image

image

script:

local PhysicsService = game:GetService("PhysicsService")
local Players = game:GetService("Players")

local function onDescendantAdded(descendant)
	-- Set collision group for any part descendant
	if descendant:IsA("BasePart") then
		descendant.CollisionGroup = "Characters"
	end
end

local function onCharacterAdded(character)
	-- Process existing and new descendants for physics setup
	for _, descendant in pairs(character:GetDescendants()) do
		onDescendantAdded(descendant)
	end
	character.DescendantAdded:Connect(onDescendantAdded)
end

Players.PlayerAdded:Connect(function(player)
	-- Detect when the player's character is added
	player.CharacterAdded:Connect(onCharacterAdded)
end)

heres a video:

(sorry for the first throw sometimes it doesn’t collide at all)

any help appreciated!

Hey,

So if you just changed the ball collisiongroup in roblox studio only, when loaded in game it doesn’t change the collisiongroup at all of the particular object, try setting the collision by a script instead.

Ball.CollisionGroup = ‘Football’

I am with the character I will try with football