So I noticed that my collision groups just stopped working. I did a simple test with a brick on an empty baseplate to see if the problem is specific to my game, but apparently it isn’t because that test failed as well.
Here’s my script:
local Ps = game:GetService("PhysicsService")
Ps:CreateCollisionGroup("Test")
Ps:SetPartCollisionGroup(game.Workspace:WaitForChild("TestPart"), "Test")
Ps:CollisionGroupSetCollidable("Test", "Test", true)
game.Players.PlayerAdded:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
print(Character.Name) -- Prints
Ps:SetPartCollisionGroup(Character:WaitForChild("HumanoidRootPart"), "Test")
end)
The result:
What am I doing wrong?