I am making a tycoon game and items keep falling of the edge of the conveyor. I want to make invisible walls that players can’t collide with. The objects on the conveyor need to collide with them to stop them falling. I’m using Zed’s Tycoon Kit. Can someone please tell me how?
How can I set the players collision groups?
There is an easier way I found out.
Set the object cancollide to false, and in a local script inside starter player scripts do
local part = workspace.part
part.CanCollide = true
1 Like
Players can still collide with it.
Don’t think it should? Make sure your changing the variable to your part that you want the player to not collide with
I have and players still collide with it. The script you sent me enables the collisions in the part so they collide with it.
Ohh I didn’t understand your question. Just do everything reversed and it should work
Put cancollide to true in property menu then do the script above but to disable cancollide
local part = workspace.part
part.CanCollide = false
1 Like
use collision groups
so you can filter collisions
here is an example
local PhysicsService = game:GetService("PhysicsService")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
for i, BaseParts in pairs(Character:GetDescendants()) do
if BaseParts:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(BaseParts, "Character")
end
end
end)
end)
game.Workspace.TycoonParts.ChildAdded:Connect(function(Item)
PhysicsService:SetPartCollisionGroup(Item, "Conveyor parts")
end)
1 Like