Roblox’s events don’t return
the value, a return
inside an RBXConnection
only stop the function.
You can make it store in a variable and return the variable:
local value = nil
option1.MouseButton1Click:Connect(function()
-- Code
value = true
end)
If you need the variable to be updated, you can save it in a table and return the table:
local values = {}
option1.MouseButton1Click:Connect(function()
-- Code
values.Active = true
end)