Answered by
7 years ago Edited 7 years ago
What you must be doing is
1 | o.Changed:connect( function (value) |
2 | if value = = 1 then print (“one”) |
3 | elseif value = = 2 then print (“two”) |
4 | elseif value = = 3 then print (“three”) |
Also consider changing the “ sign on the above code because I’m on my phone and it’s different on pc. You don’t need to set a ‘ow’ and what you were doing wrong is that the script runs coded like by line and once it has executed a line it doesn’t come back. So local ow will always be what value it had at the time of execution. You can also do it bu placing local ow inside the changed function.
Thank you!