How and why does this not work, I got multiple people telling the same script to do what I'm doing and it doesn't work...
local Button = script.Parent
local Door4 = game:GetService("Workspace"):WaitForChild("Door4")
Door4.Anchored = true
Button.MouseButton1Click:Connect(function()
if Door4.CanCollide then
Door4.CanCollide = not Door4.CanCollide
elseif not Door4.CanCollide then
Door4.CanCollide = true
end
end)

1 comment
Edit: Moved your script to your question. It's better practice to do so, as seeing a question having an answer already makes people not look at it.