So I have a script in workspace, with a value in that script.
local value = script.Value value.Value = true value.Value = false value:GetPropertyChangedSignal("Value"):Connect(function() if inGame.Value == false then --rest of script end end)
However, the problem is the script never starts.
Is there any reason as to why?
try this, tell me what prints. also, are you sure ur changing the value?
local value = script.Value value.Value = true value.Value = false --ingame was never declared, declare it. value:GetPropertyChangedSignal("Value"):Connect(function() warn("Value Changed") if inGame.Value == false then --rest of script warn("false") else print("true") end end)
ok so, you have to put the " = true, = false" AFTER the GetPropertyChanged
Also, script.Value is probably not a valid property of a script.. It isn't...
Try
script.Parent.Value
Instead...., and I hope you're using a value based object like StringValue, IntValue, etc. On those objects, only the Value property can be used with GetPropertyChanged as detailed in the following link of the Roblox documentation.
https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal