I dont know how to word it and what the problem is but here’s the problem:
The block keeps going in and out of the seat for some reason.
script:
function pes()
if script.Parent:IsDescendantOf(workspace.PlacedObjects) then
local v = script.Parent.Parent
for g,a in pairs(v:GetChildren()) do
for l,m in pairs(a:GetDescendants()) do
if m:IsA("Part") then
local seatt = m:GetConnectedParts(true)
for r,q in pairs(v:GetChildren()) do
if q:IsA("Model") then
local yease = table.find(seatt,q.PrimaryPart)
if not yease then
q.Parent = workspace.PlacedObjects
end
end
for j,k in pairs(workspace.PlacedObjects:GetChildren()) do
if not k:FindFirstChild("Seat") and k:IsA("Model") then
local yeasee = table.find(seatt,k.PrimaryPart)
if yeasee ~= nil then
k.Parent = v
end
end
end
end
end end
end
end
end
game:GetService("RunService").Heartbeat:Connect(pes)
I dont know if it has to do with the connected parts set to true or the table seatt.