ControlScript is not a valid member of PlayerScripts

Hello there,

I just received a few messages from people who play my game that said my horse is broken, so I wen’t to see it and it didn’t work, so I checked the DevConsole and got this error saying that the ControlScript is not a valid member of the PlayerScripts, does anyone know what this is supposed to mean? It said the error was on line 54 of my LocalScript that controls the horses, if anyone knows how to fix this please let me know!




The PlayerScript layout has changed. You should be able to search the forums to find the announcement. In addition, I think I can recall someone recently asking a different version of what you are asking now. Maybe someone has easy access to some useful links they can post, but you should be able to find everything by searching for it.

Edit: I felt a little guilty giving such a short message after you put together such a well formatted question. I did some searching and found the post that answers your question here: How to disable player controls with new PlayerScript layout?



Recently, new player scripts were introduced, seen here.

Here’s a photo of the new structure.

Manually disabling the player controls cannot be done by disabling the script but now by disabling via a method within the new controls.

I recently made a post about this and how to properly require the new module in order to toggle controls.

The post I made about this can be seen here, as well as the example code.

If you have any other questions about this new player script format, feel free to ask and I’ll do my best to answer correctly.



Would disabling the Poppercam / Poppercam stop the Camera Bug that’s messing up most Camera Shop Systems??

I’ll have to look into that, but I know there have been issues with the legacy camera code recently.

Hopefully this is fixed, [issue referenced here]

1 Like

I have a quick question, how did you get the playermodule script? Do I have to have it in my game?

The player module is automatically added to the StarterPlayerScripts when a server starts up UNLESS the following criteria are met:

The server finds scripts named “ControlScript” and/or “CameraScript” in StarterPlayerScripts

If this is above statement is valid, then the new PlayerModule will not be added to the StarterPlayerScripts.
On the other hand, if those names are not present, then the PlayerModule will be added.

To properly require the new PlayerModule, include the following code in a local script.

local playerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")

and to access the control and camera methods, include the following code with the above code.

local controls = playerModule:GetControls()
local cameras = playerModule:GetCameras()

If you have any more questions or need an example, feel free to ask :+1: