So i’m making a tycoon, and there’s a dropper that drops ore.
What i need is that the ores can collide with the floor, conveyor or anything else, but not with each other.
The ores are in a model by the way
I’ve tried collision groups, but i never got the hang of it. Help please!
Create a collision group this way:
local ps = game:GetService("PhysicsService")
local group = ps:CreateCollisionGroup("OreParts") -- Returns a unique ID but we won't be needing it.
Then make it so parts in that group can’t collide with anything in the same group:
ps:CollisionGroupSetCollidable("OreParts", "OreParts", false)
Then, most importantly, each time an ore is added to the game you do this:
ps:SetPartCollisionGroup(newPart, "OreParts")
Try the NoCollisionConstraint
Simply select the two parts you don’t want to collide.
Collision groups are better for much larger sets of parts.
If OP is creating the dropper + conveyor belt type system that we see in classic tycoon games then he should definitely use collision groups.
Yep, definitely. I managed to miss the fact it was a dropper making lots of these.
Definitely collision groups.
Oh! I didn’t know you could set the same collision group to non collide false!
Could you help me with this please
local ps = game:GetService("PhysicsService")
local group = ps:CreateCollisionGroup("Ships")
ps:CollisionGroupSetCollidable("Ships", "Ships", false)
local rs = game.ReplicatedStorage
rs.collidetest.Event:Connect(function(t)
for I = 1 , #t do
if t.ClassName == "Part" or t.ClassName == "Seat" then
ps:SetPartCollisionGroup(t, "Ships")
print("p")
end
end
end)
The event fires and the script and print go through but the parts still collide with eachother
nvm it was deprecated rsdfdfghdfghdfg