I have a local script with a stringvalue and 2 boolvalues inside of it. The localscript is inside a model that is inside replicated storage. Eventually a textbutton causes the model to be put inside workspace.CurrentCamera.
Disabled is set to false and filteringenabled is also set to false
The very first line of the localscript is
print("Starting")
It doesn't show print("Starting") anywhere in the developer console, and it doesn't give any errors. None of the other lines of code after it run either.
Hello, blowup999
The problem is the parent. LocalScripts
does not run inside workspace.CurrentCamera
so maybe you should replicate it somewhere else.
~Radio
If this helped you, accept and upvote, it helps both of us :)
Your problem may be that localScripts only run inside specific places in the game.
A LocalScript will only run Lua code if it is a descendant of one of the following objects:
A Player's Backpack, such as a child of a Tool
A Player's Character model
A Player's PlayerGui
A Player's PlayerScripts
The ReplicatedFirst service
Note: the parent of the LocalScript will determine which client the Lua code will be executed on.
Try putting the script into the player's scripts or ReplicatedFirst, and it should work