I have this script in ServerScriptService that is supposed to check when a value in ReplicatedStorage changes, and fires a Bindable event.
local BeginGameEvent = workspace.BindableEvents.BeginGame
local GameStart = game:GetService("ReplicatedStorage").GameStart
GameStart.Value = true --changes the value
GameStart:GetPropertyChangedSignal("Value"):Connect(function() --checks for the change
print(GameStart.Value)
if GameStart.Value == true then
print("starting game...")
BeginGameEvent:Fire() --fires the bindable event for below
GameStart.Value = false
end
end)
BeginGameEvent.Event:Connect(function()
local lighting = game:GetService("Lighting") --sets up lighting properties
print("setting up lighting")
lighting.TimeOfDay = 12
lighting.FogEnd = 1000000
end)
For some reason, the GetPropertyChangedSignal() never fires, since it never prints anything. No errors in the output either. However, the part where I change the GameStart value does work and sets the value from false to true. I also tried firing the BindableEvent manually in the command bar, but that didn't work either? I really don't understand what's going on, and this has really stumped me.

1 comment
If my answer has helped you then please mark it as the accepted answer.