TypedPlayerModule | A conveniently typed & patched version of Roblox's PlayerModule

This is a module I’ve had in my toolbox for a while, and I decided to share it here in this post.

All it does is wrap around a modified version (see modifications below) of Roblox’s PlayerModule and provide detailed & accurate types for the classes contained within.

Modifications

Made CameraModule return the actual CameraModule instead of an empty table (it does this by default, idk why)
Added a zoomController field to CameraModule
Added a Popper field to ZoomController
Added a SetOcclusionCheckFn function to Popper (this controls what parts your camera can pass through or not)

Download:
PlayerModule.rbxm (149.4 KB)
(and yes all the types are hand written :smiling_face_with_tear: )

19 Likes

all those types… wonder how your hands are doing rn

thank you!!!

This is really cool, but I found out the hard way that this has poor support for Console and Mobile! :cry:

Camera Support

Platform Support
Computer :white_check_mark: Perfect
Mobile :white_check_mark: Perfect
Console :white_check_mark: Perfect
VR :broken_heart: Broken

Movement Support

Platform Support
Computer :white_check_mark: Perfect
Mobile :yellow_circle: Buggy [1]
Console :yellow_circle: Buggy [2]
VR :broken_heart: Broken

[1]: When changing movement types, you need to rejoin to be able to move again.
[2]: Works fine when emulating an Xbox or PS system, but not on PC when using a gamepad only.

All platforms work perfectly without this modified PlayerModule. I support the idea though! I believe you can fix this if you put your mind to it. Though, it would be understandable if you wanted to convert this to just types and no modifications to the behavior of the PlayerModule itself. That way, the worst that can happen is outdated type definitions, and you could easily fix that with AI.

Ah ithink ik why, thanks for the report

To be fair, that’s a lot to fix. There’s probably multiple underlying issues. Feel free to contact me in a private message if you want me to test something!

Its not, its 1 change i did :V

Oh, well let me know when you fix it! :3

1 Like