I have an error on line 29. which is script.Parent.ClickDetector.MouseClick:connect(onClick)
Please may you help me with this? Has there been an update or something?
My error is Attempt to connect failed: Passed value is not a function
This is the whole script:
debounce = false
function raiseone()
for i= 1,71 do
script.Parent.DoorOne.CFrame = script.Parent.DoorOne.CFrame + Vector3.new(0,0.1,0)
wait(0.02)
end
function raisetwo()
for i= 1,71 do
script.Parent.DoorTwo.CFrame = script.Parent.DoorTwo.CFrame + Vector3.new(0,0.1,0)
wait(0.02)
end
function onClick()
if debounce == false then
debounce = true
game.Workspace.BarDoor.BarButton.BrickColor = BrickColor.Red()
spawn(raiseone)
spawn(raisetwo)
wait(25)
game.Workspace.BarDoor.BarButton.BrickColor = BrickColor.Green()
debounce = false
end
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)

1 comment
THANK YOU SENPAI! GIVE ME ATTENTION SENPAI! ;D ;D ;D ;D. no srsly tho. thx :)