The SCP isn’t supposed to go under the baseplate, It’s supposed to slide on the baseplate.
Anyway, I then got told to use CollisionGroups, so I got working on it.
local Model = script.Parent
local PhysicsService = game:GetService("PhysicsService")
local Gegegegegegegegeg = "Obstacles"
local okkkkkkkkkkkkk = "SomeRandomObject"
pcall(function()
PhysicsService:CreateCollisionGroup("Gegegegegegegegeg")
PhysicsService:CreateCollisionGroup("okkkkkkkkkkkkk")
end)
for i,v in pairs(Model:GetChildren()) do
if v:IsA("BasePart") and v.Name == "CensorPart" or "Glow" or "HumanoidRootPart" then
PhysicsService:SetPartCollisionGroup(workspace.BetterBasePlates, Gegegegegegegegeg)
PhysicsService:SetPartCollisionGroup(v, okkkkkkkkkkkkk)
end
end
I also have a CollisionGroup set up, if I click BlueObject, it selects my SCP (which is intended) and if I click obstacles, it selects my BasePlate (which is also intended). So, I am quite confused.
warn("gdfgdfgdfgdf")
local Model = script.Parent
local PhysicsService = game:GetService("PhysicsService")
local Gegegegegegegegeg = "Obstacles"
local okkkkkkkkkkkkk = "SomeRandomObject"
pcall(function()
PhysicsService:CreateCollisionGroup(Gegegegegegegegeg)
PhysicsService:CreateCollisionGroup(okkkkkkkkkkkkk)
for i,v in pairs(Model:GetChildren()) do
if v:IsA("BasePart") and v.Name == "CensorPart" or "Glow" or "HumanoidRootPart" then
PhysicsService:SetPartCollisionGroup(workspace.BetterBasePlates, Gegegegegegegegeg, true)
PhysicsService:SetPartCollisionGroup(v, okkkkkkkkkkkkk)
end
end
end)
However, the SCP still goes under the baseplate. I don’t know if I set up the collision groups incorrectly.
It will really help both us and your future self out if you name your variables something meaningful, or at least give them a name which isn’t an arbitrary number of repeating characters that will inevitably get mistyped and be really difficult to spot! I guarantee at some point you’re going to get weird errors in your collisions groups because you accidentally put ‘okkkkkkkkkkkk’ instead of ‘okkkkkkkkkkkkk’ somewhere.
Well you say you already created them in the editor plugin, so are you then trying to create the same groups again via code? Also how does your SCP actually move?
If you’re using TweenService then presumably that means it’s being moved with Position or CFrame, which don’t interact with physics. So your issue here isn’t really anything to do with collision groups, and is instead to do with your pathfinding or tweening code.
In my case because the game I am developing for has this exact same object, we move it with body movers. This is fairly effective considering body movers and collisions both fall under the physics pipeline, so they fit hand in hand. I wouldn’t say TweenService is great to use here, that’s more suited to statically moving objects.