This is a LocalScript under a TextButton under a SurfaceGui under a part, I honestly have no idea what is causing this. I used print but that doesn’t print. No errors. Just nothing happens despite it being a 4 line function with little to it.
What do you want to do? Activate the Textbutton? Because cameraToggleButton.Activated:Connect(function() will just run if the Button is activated but i dont see where u trying to active the Button
To make it so that the button (cameraToggleButton as the script.Parent), when clicked/tapped depending on the device will run the code in the function it is connected to.
the script is in the workspace which stops local scripts from running
the button in the surface gui not the screen gui
if the gui is a billboard gui and not surface gui then that explains everything, for some reason, billboard gui doesn’t detect user input, so you’ll have to put it in the PlayerGui/StarterGui and set the Adornee to the LaptopScreen
Yeah at this point I am just going to use a screenGui and make it “fit” onto the laptopScreen like I did before I tried to convert it to a SurfaceGui for convenience.
Edit: Ok I found out how to make it work and it took me way too long considering my coding skills. I just put the local script into StarterPlayerScripts, a LocalScript compatible parent/ancestor, and modified the LocalScript for the Guis. I’m just gonna give the first person who told me that workspace is not a compatible parent/ancestor for LocalScripts the solution thing.