SetPartCollisionGroup update

im making it so players have no collision against eachother but idk how to change setpartcollisiongroup to basepart.collisiongroup

this is my script


script.Parent = game:GetService("ServerScriptService")
local PhysService = game:GetService("PhysicsService")
local PlayerGroup = PhysService:RegisterCollisionGroup("p")
PhysService:CollisionGroupSetCollidable("p","p",false)

function NoCollide(model)
	for k,v in pairs (model:GetChildren()) do
		if v:IsA"BasePart" then
			PhysService:SetPartCollisionGroup(v, "p")

		end
	end
end

game:GetService("Players").PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(char)
		char:WaitForChild("HumanoidRootPart")
		char:WaitForChild("Head")
		char:WaitForChild("Humanoid")
		wait(0.1)
		NoCollide(char)

		if player.Character then
			NoCollide(player.Character)
		end
	end)
end)

thanks

u dont need to do this all in scripts, just make a collision group called ‘player’ in studio and make it so player doesnt collide with player, and make sure to set all character parts of all players to the ‘player’ collision group