Local scripts that were enabled dont run

  1. What do you want to achieve? Keep it simple and clear!
    A: i want to enable around 3 local scripts located in: 2 in starter gui and 1 in starter player scripts

  2. What is the issue? Include screenshots / videos if possible!
    A: when i enable the scripts, they simply dont run at all
    the 2 in startergui handle camera movement, while the one in player scripts handle the buttons and their respective actions
    image
    (these are the buttons)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    A: i looked around google and devforum to see if i could find anything related but didnt find anything to solve my problem

PlayerScripts.Main.Disabled = false
Camera.CFrame = workspace.InitialCamera.CFrame
for _, v in pairs(StarterGUI.Scripts:GetDescendants()) do
	if v.ClassName == "LocalScript" and v ~= script then
		v.Disabled = false
		print("activate")
	end
end

(this is from a local script too)
i checked if the print ran and it does, yet none of the scripts do anything

1 Like

StarterGui is copied over into PlayerGui, but my guess would be LocalScripts inside StarterGui specifically don’t run.

Try changing StarterGui to use LocalPlayer.PlayerGui instead.

1 Like

oh wow it worked, partially
the main script is still yet to fixed though which is the one that handles everything
(also tried the same trick with it as the 2 gui scripts but didnt work)

1 Like

oh nevermind it worked, there was just something preventing it from activating, thank you so much

1 Like