so i was testing the fgame and got and error saying >17:50:11.426 - Workspace.Door1.Script:8: Expected 'then' when parsing if statement, got 'if' heres my code:
Heres my code:
local rc = 100
local debounce = true
script.Parent.Touched(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player.leaderstats.Bucks.Value >= rc
if debounce then
debounce = false
script.Parent.Transparency 0.7
script.Parent.CanCollide = false
if rc.Value <= rc then
script.Parent.Transparency = 0.5
script.Parent.CanCollide = true
end
end
end
end)

2 comments
put in code block pls
fixed the code sorry