How come whenever I want to make it to where when I click on the specific block, it doesn't change the variable 'PERMISSION' to true? The only thing i'm needing it to do is change that variable inside of a function.
Thank you for your time
PERMISSION = false
script.Parent.ClickDetector.MouseClick:Connect(function(PERMISSIONGRANTED)
script.Parent.BrickColor = BrickColor.new ("Lime green")
PERMISSION = true
end)
if PERMISSION == true then
print("SCRIPT SUCCESSFUL")
end

2 comments
please use code blocks
If kiriot22 solves your problem don't forget to accept his answer