having some problems (again) but as the title says, it is with a road checkpoint, I am not the greatest scripter around and till have alot to learn but I cannot really find a problem here.
local tween = game:GetService("TweenService")
local main = script.Parent.main
local ocf = main.CFrame
local open = tween:Create(main - CFrame.Angles(0,math.rad(4.5),0)
)
local close = main - CFrame.Angles(0,math.rad(4.5),0)
local debounce = true
local ProximityPrompt = script.Parent.TopPart.Attachment.ProximityPrompt
ProximityPrompt.Triggered:Connect(function(player)
if player and player == game.Players:FindFirstChild(player.Name) then
if debounce == true then
debounce = false
open:Play()
wait(7)
close:Play()
wait(3)
debounce = true
end
end
end)
while wait() do
if debounce == true then
ProximityPrompt.Enabled = true
else
ProximityPrompt.Enabled = false
end
end