What is the PlayerModule?

I have been looking through the quick tour place’s scripts to learn some practices, and came across this PlayerModule module referenced in them
player.PlayerScripts:WaitForChild("PlayerModule")
People seem to be discussing this module alot, yet as far as I can tell it is not documented anywhere as a part of Roblox, nor is it a custom script a part in this particular project. So there are actually two questions

  1. How do you track down the source of the module that only appears at runtime and the way it gets in
  2. How do you utilize a module that is neither documented as part of Roblox nor listed among the project scripts
3 Likes

The player module is the location for both the movement and the camera of the player (lockshift, camera options and the main movement of the character).

you can track the module by playtesting the game, and then open explorer > player > playerScripts.
if you want to experiment with the module, you can copy the module, close the game and paste it on StarterPlayer > StarterPlayerScripts

well, as i said, you have to experiment by yourself. however you can search informations on the this devdorum, but im not sure there are the answers you find.

summary: the PlayerModule is where the Player movement and Camera are located, is safe to customize BUT there aren’t really informations of tutorials.

1 Like
  1. What I want is to understand the way it gets into the game. Surely the scripts do not appear out of nowhere. There should be a specific, hopefully documented, way that enables this.

Trough the core scripts like the topbar appear in the game

  1. The scripts are inserted by the engine. This is documented under StarterPlayerScripts | Documentation - Roblox Creator Hub, where they are referenced to as “the default multi-platform Roblox control scripts for the camera and character”. The scripts themselves seem to come from here .
  2. These scripts are designed to be replaced by a custom version in the project when custom logic is required, just as @deaconstjohn03 said. I wouldn’t use the default “PlayerModule” from the custom scripts, there is no telling when and how it might change. I guess the quick tour is not intended as a demonstration of good scripting practices.
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.