So I am trying to access a local script in the Player's starting scripts called cam, this is the code I have in my GUI's localscript: zoom = script.Parent.Parent.Parent.PlayerScripts.cam
It is giving me this beautiful error: cam is not a valid member of PlayerScripts
This is what my current Explorer looks like in that area. https://gyazo.com/d1fad2c66fa220fbf51e519de8cb2d18
If anyone could help that would be lovely :)
Try doing something of this nature how about using the :findFirstChild()
or :WaitForChild()
method because it thinks you're addressing the property sometimes.... So do something like this:
local cam = script.Parent.Parent.Parent.PlayerScripts:WaitForChild("cam") -- I prefer :WaitForChild() method because it is less laggy and more efficient.
Thanks for reading the answer! I hope I helped.