I can collide with a part thats not there

Hey, I’ve been working on a door that opens, this video will show how.

As you can see, at the end I can’t go through the door even though the door has moved. Any solutions? (Yes I have tried to go in it different ways, so its not the size thats the problem)

My code is:

local D = script.Parent.Detector
local DE = false

local T = game:GetService(“TweenService”)

script.Parent.PrimaryPart.Touched:Connect(function(h)
if DE == false then
if h.Parent:FindFirstChildWhichIsA(“Humanoid”) and h.Parent ~= workspace.SCPS then
if h.Parent:FindFirstChild(“ClassDCard”) then
D.BrickColor = BrickColor.Green()
D.Material = Enum.Material.Neon
D.beep:Play()
DE = true
for _,v in ipairs(script.Parent.Parent:GetChildren()) do
print(“aA”)
if v:IsA(“BasePart”) then
v.CanCollide = false
local E = T:Create(v, TweenInfo.new(1), {Position = v.Position + Vector3.new(-4)})
E:Play()
end
end

			wait(2)
			for _,v in ipairs(script.Parent.Parent:GetChildren()) do
				print("aA")
				if v:IsA("BasePart") then
					v.CanCollide = false
					local E = T:Create(v, TweenInfo.new(1), {Position = v.Position + Vector3.new(4)})
					E:Play()
				end
			end	
		D.BrickColor = BrickColor.Gray()
			D.Material = Enum.Material.SmoothPlastic
			wait(1.5)
		DE = false
	elseif h.Parent:FindFirstChild("CanUnlockNothingCard") then
		D.BrickColor = BrickColor.Red()
		D.Material = Enum.Material.Neon
		D["Error Beep"]:Play()
			DE = true
			
		wait(2)
		D.BrickColor = BrickColor.Gray()
		D.Material = Enum.Material.SmoothPlastic
		DE = false
		end
	end
end

end)

as you see, I have tried turning cancollide to false.

1 Like

Could any other part be blocking the doorway? Unlock the door and under the Test panel at the top, click Current: Client to change it to Current: Server. This will allow you to enter server view, and see if you can select anything that is there, or if the door doesn’t move on the server.

Additionally, you may want to try setting the .CanCollide property of your keycard to false to see if it is blocking your entry.

If there are any unions make sure they have CollisionFidelity set to precise

ok will do, @MegabyteOfficial and @3Ogre

It was a union, thank you so much!

1 Like