Alright so I just discovered bools a life saver to making my first game lass glitch-full! so I have theese two pieces of code:
function onClicked(playerWhoClicked)
Local Mybool = true
game.Workspace.B1.Transparency =100
game.Workspace.PA.Transparency =0
game.Workspace.PB.Transparency =0
game.Workspace.PD.Transparency =0
game.Workspace.PE.Transparency =0
local points = playerWhoClicked.leaderstats.Money
points.Value = points.Value-20
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
and
function onClicked(playerWhoClicked)
script.Parent.BrickColor = BrickColor.Red()
local points = playerWhoClicked.leaderstats.Copper
points.Value = points.Value-1
local debrisServ = game:GetService('Debris')
local blockLife = 1
local dropper = Instance.new('Part', game.Workspace)
dropper.Anchored = false
dropper.CFrame = CFrame.new(-133, 9, 93)
local dropPart = Instance.new('Part')
dropPart.Color = Color3.new(0,0,0)
wait(1.2)
local points = playerWhoClicked.leaderstats.Money
points.Value = points.Value+5
wait(4)
script.Parent.BrickColor = BrickColor.Green()
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
So I really want to put bools into one of them but when I try to inset one by saying
Mybool= True
but whenever I try it gives me there errors like WOO1 not global, try localising it, expected = got Mybool, I just cannot seem to find how to make one work PLEASE HELP!

2 comments
Didn't work created it then gave me this error Workspace.Part.Script:40: 'end' expected (to close 'function' at line 1) near ''
What is on line 40?