I am build a Menu for a HOLO. I have the cameras working and so is the GUI(But the button is not working because of the PlayerScripts)
My attempt was to remove the PlayerScripts(CameraScript and ControlScript) then when I press the button, the PlayerScript that I have a copy of will be ":clone()" into the Player's PlayerScript folder.
The problem it is wont delete nor add the script because of the following: "attempt to index global 'p' (a nil value)" on any line that uses... "p".
--//Myaxp game.Players.ChildAdded:connect(function(p) -- Another script loads the PlayerScripts into the player through a button. --a = game:GetService("Players").LocalPlayer wait(1) --a = game:GetService("Players") p.LocalPlayer.PlayerScript.CameraScript:Destroy() p.LocalPlayer.PlayerScript.ControlScript:Destroy() end) --//End
BTW, "Line 4" had PlayerAdded but seemed to have no effect, neither does ChildAdded. So I don't know what I did wrong.
Can someone figure out the problem?
--//Myaxp
Locked by HungryJaffer and Redbullusa
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?