Collision door problems

Hello! So I’m making a door script and the problem is that when it’s opened I can for some reason go thorough that. However I cannot walk through some places.

CODE

local door = script.Parent
local open = false
local locked = false
local db = false
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)

local openPos = CFrame.Angles(0,math.rad(90),0)*door.MainWeld.C0*CFrame.new(2,0,-2)
local closePos = door.MainWeld.C0

door.DoorPromt.Triggered:Connect(function()
	if db == false and locked == false then
		db = true
		if open == false then
			ts:Create(door.MainWeld,ti,{C0 = openPos}):Play()
		else
			ts:Create(door.MainWeld,ti,{C0 = closePos}):Play()
		end
		open = not open
		wait(.5)
		db = false
	end
end)

door.DoorHandle.LockPromt.Triggered:Connect(function()
	locked = not locked
end)

DEMONSTRATION

Set cancollide to true, so that you cant go through it
door.cancollide = true

It’s at true when it’s opened already. There no any point istead of setting cancollide to false and then to true again.

If cancollide is true, then how are you able to walk through it???
:frowning:

ROBLOX magic. I checked door cancollide when its opened and it’s true.

I think that it’s a bug, and that it just broke for a sec.

Is there an Invisible part when the door is closed?

Added new video to post. Probably tweenservice bug or idk.

No. Only Door and DoorHandle is a parts of door

This sounds really basic but gotta make do
place a part that cant be gone through at the door open position.
when its open set cancollide to true.
when its closed set it to false.

Ye it can solve the problem but will be very messy when there will be a lot of maps with doors.

Yeah until they solve that bug gotta make do.

Probably. I think it’s better to use for i instead of tween service instead of that.

Are you using any scripts related to character collisions? There’s a change that the collision script is using PhysicsService to set a Collision Group collision state between you and a group of parts(for example workspace:GetChildren()), and the script thinks door belongs to that group.

No there no any scripts like that.

Well my best guess is that it’s either this, or the door CanCollide property is false. Are all the scripts made by you? and if no are you aware of what every script exactly does?

This man is right. If you want to get helped here, show how us the full script because nothing in your original post shows anything to do with CanCollide.

Heck is Roblox magic? Show us where that code is, unless you don’t wanna get helped.

Code in the post the is full script and the only script that interacts with the door. I telling that there no any scripts in game interacted with cancollide.

Every script in my game is by me expect RaycastModulev4 or how its called and rocket launcher made by roblox i took for testing.

It’s probably a bug, so you have to work around it