I get this error:
15:13:52.062 - Workspace.Detect.Main:6: attempt to index local 'Player' (a nil value) 15:13:52.063 - Stack Begin
15:13:52.063 - Script 'Workspace.Detect.Main', Line 6 15:13:52.064 - Stack End
15:13:52.064 - Disconnected event because of exception
on this script:
local Enabled = true
function onClick(Brick)
if Enabled == true then
local Player = Brick.Parent:findFirstChild("Humanoid")
local Character = game:GetService('Players'):GetPlayerFromCharacter(Player.Parent)
Enabled = false
print("Stage 1")
if Player ~= nil then
print("Stage 2")
if Player.Parent.Car ~= nil then
print("Stage 3")
if Character.Money.Value >= 50 then
print("Stage 4")
Player.Car.Fuel = player.Car.Fuel + 50
Character.Money.Value = Character.Money.Value - 50
wait(5)
Enabled = true
end
end
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)
I've gone over it multiple times and I can't find an error. Can anyone please help?

2 comments
I only get Stage 1 printed. Stage 2 is not printed.
Well that's because you didn't fix the other problems that rooted from that first one ._.