Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I have problem with Set player in PhysicsCollision Group. How can i fix this?

Asked by 2 years ago
Edited 2 years ago

I learning coding and i dont know why this isn working

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

Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        for i, object in ipairs(character:GetDescendants()) do
            if object:IsA("BasePart") then
                PhysicsService:SetPartCollisionGroup(object, "Player")
            end
        end
    end)
end)

in collision group i have only can collision with default nothing more I have group Mob and i dont want collision with player but event coping 1:1 from video still doeasnt working

Answer this question