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?
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