Use collision groups.
local PhysicsService = game:GetService("PhysicsService")
PhysicsService:CreateCollisionGroup("Players")
PhysicsService:CreateCollisionGroup("Ore")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
for i, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part,"Players")
end
end
end)
end)
PhysicsService:CollisionGroupSetCollidable("Players","Ore",false)
PhysicsService:CollisionGroupSetCollidable("Ore","Ore",false)
and then use this when the ore is spawned:
PhysicsService:SetPartCollisionGroup(Ore,"Ore")
where Ore (the variable, not the string) is the ore that spawned.
Here is an article that explains it: https://developer.roblox.com/en-us/articles/Collision-Filtering
3 comments
Where do I put this script...? In every 'dropperscript' or just one script? I'm confused.
So, good news it works. BAD NEWS is that it breaks the entire game and you cannot pickup objects, place them, etc. And if I disable that then the character falls through the map.
You only need to run the first script once. Then you put the second script in every dropper script. Also, I need a bit more information to tell what went wrong.