Hello there! I am faced with the task of making "PlayerCollisionGroup" collision group unable to push "NpcCollisionGroup"? I searched everywhere but didn't find an answer. Note that collision must be enabled. Here is my code, :
game:GetService("PhysicsService"):CreateCollisionGroup("PlayerCollisionGroup")
game:GetService("PhysicsService"):CreateCollisionGroup("NpcCollisionGroup")
for i, v in pairs(game.Workspace.NpcsOfBase63.NpcCarl) do
if v:IsA("BasePart") then
game:GetService("PhysicsService"):SetPartCollisionGroup(v, "NpcCollisionGroup")
end
end
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
for i, child in pairs(char:GetChildren()) do
if child:IsA("BasePart") then
game:GetService("PhysicsService"):SetPartCollisionGroup(child,"PlayerCollisionGroup")
end
end
end)
end)
