Hi folks, I've been trying to work on a set of Bollards that move down when a car has touched the sensor and that it goes back up after 5 seconds it touched it. Here's the code:
Debounce = false
script.Parent.Touched:connect(function(Rise)
if Debounce == true then return end
Debounce = true
if Rise.Parent:FindFirstChild("VehicleSeat")then
for Move = 1,5 do
script.Parent.Parent.Bollards:MoveTo(script.Parent.Parent.Bollards:GetModelCFrame().p + Vector3.new(0, -1, 0))
wait()
end
wait(4)
for Move = 1,5 do
script.Parent.Parent.Bollards:MoveTo(script.Parent.Parent.Bollards:GetModelCFrame().p + Vector3.new(0, 1, 0))
wait()
Debounce = false
end
end
end)
Any help will be much appreciated! Thanks!

1 comment
Thanks but this isn't what I was looking for. I know how to slide parts, but with a Model is a lot harder. Anyway, thanks for trying!