I’m trying to get
print(“Changed real??!”)
to print in the output, but it doesn’t, but for some reason
WS:GetAttributeChangedSignal(“BlackOut”):Connect(function()
works (using BreakPoints)
Script:
local WS = game:GetService("Workspace")
local SecondUntil = math.random(1,2) -- 350,950
local ChanceOfActualBlackOut = math.random(1,2) -- 1,2
task.wait(SecondUntil)
if ChanceOfActualBlackOut == 1 then
WS:SetAttribute("BlackOut", true)
else
task.wait(SecondUntil/2)
WS:SetAttribute("BlackOut", true)
end
print("That is correct!")
WS:GetAttributeChangedSignal("BlackOut"):Connect(function()
print("Changed real??!")
if game:GetService("Workspace"):GetAttribute() == true then
print("So true")
local FirstDigit = math.random(0,9)
local SecondDigit = math.random(0,9)
local ThirdDigit = math.random(0,9)
local FourthDigit = math.random(0,9)
local FinalCode = tostring(FirstDigit..SecondDigit..ThirdDigit..FourthDigit)
print("The code is "..FinalCode)
game:GetService("ReplicatedStorage").BlackOut.BlackOutCodeSender:FireAllClients(FinalCode)
end
end)
No errors are sent in the Output.