Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 03 Aug 2015 07:34 PM |
Apparently when I change the value of the NumberValue, nothing prints, or the function doesnt work.
Some info on how this script was "created":
The original script is stored in ServerStorage. Then, a copy is made, and put into the NumberValue.
I also tried disabling it before the copying, and enabling it after the copy, but that didnt work either.
Perhaps I should premake the Value to? And instead simply copy the entire thing, rather than just copy the script?
I have moved scripts before, and they still worked afterwards. Not sure what the problem here is... Any help?
Or I am making a stupid mistake with the code? ______________________________________________
The script inside of NumberValue:
script.Parent.Changed:connect(function() print("a value changed!!!") end)
|
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 03 Aug 2015 07:37 PM |
script.Parent.Changed:connect(function(newVal) print("script.Parent.Value = "..newVal) end)
script.Parent.Value = 1337
if that doesn't work, make sure the script is enabled |
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 03 Aug 2015 07:48 PM |
I am quite stupid, the NumberValue is in ServerStorage, and thus you cannot run scripts. Anyway to bypass this? I need to keep all the values in the server to prevent hackers from getting in. How can I run scripts on ServerStorage?
Or will I have to be like:
--script in serverScriptService
game.ServerStorage.Value.Changed:connect(function()
end) |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
| |
|