Hey, pretty much the title.
They’re both still colliding into each other, I’m a little unsure what I’m doing wrong.
My goal is to make “Missiles” and “Spaceship” not collide into each other, but they can collide into other things.
Thanks in advanced!
Here’s the code:
local MissilesFolder = game.ReplicatedStorage.MissilesForShop
local ShipFolder = game.ReplicatedStorage.ShipForShop
local Missiles = "Missiles"
local Spaceships = "Spaceships"
local players = game:GetService("Players")
local PS = game:GetService("PhysicsService")
PS:CreateCollisionGroup(Missiles)
PS:CreateCollisionGroup(Spaceships)
PS:CollisionGroupSetCollidable(Missiles, Spaceships, false)
for _, v in pairs(MissilesFolder:GetDescendants()) do
if v:IsA("BasePart") then
PS:SetPartCollisionGroup(v, Missiles)
end
end
for _, v in pairs(ShipFolder:GetDescendants()) do
if v:IsA("BasePart") then
PS:SetPartCollisionGroup(v, Missiles)
end
end