New PlayerScripts, Take 2

Just a heads up, we’re going to re-enable the new playerscripts today, which includes fixes for the vehicles issue we saw with the 10.18 release. This update has just minor bug fixes from the last version, and everything you need to know regarding compatibility can be found in the previous announcement post here:

https://devforum.roblox.com/t/new-player-scripts-are-coming-10-11-18-and-how-you-can-prepare/184945

33 Likes

It’s on.

6 Likes

Is it possible that these updates have changed the inventory search algorithm or anything related to it in such a way that searching the inventory causes a lag spike close to a client crash? It’s completely impossible to search for anything in an inventory with many tools. (such as in games that allow gear)

I found a bug while playing - If you disable shift-lock mode in the esc menu while shift-locked, the camera will not un-shift-lock and get stuck.

Reproduction steps:

  1. Enable shift-lock mode in the esc menu
  2. Activate shift-lock by pressing shift or interacting with the button
  3. Disable shift-lock mode in the esc menu
  4. Camera will still be in shift-lock state

Edit: as I was writing the repro, I found a typo in the code while trying to figure out the steps.

In the unmodified Popper module:

The NearZ property doesn’t exist in the Camera object, and the code errors when it runs line 37. Changing it to NearPlaneZ fixes the issue.

5 Likes

Can we get an option to disable these scripts ever being added (like we can do with chat service)?

You used to be able to disable it by putting empty localscripts in these folders but that changed a few updates ago (without any warning) and it started adding them ingame again causing bugs…

3 Likes

I’m having a problem that causes my camera to go insane when it’s supposed to move forward when something is blocking it. It’s my custom camera that hasn’t been modified in a very long time that doesn’t do anything with playerscripts but just today starting having this issue. Even though the cameratype is set to scriptable, something is interfering.

After reading Weird Camera.CFrame behaviour, I can confirm that this is what’s happening to me as well.

1 Like

This mechanism should still work the same, if you have instances in StarterPlayerScripts that have the same name as the ones we attempt to add, yours will prevent the Roblox scripts from being added.

Hmm, this should not be executing at all. If you have not set a FFlag locally or modified the code, do you have a repro? This PopperCam module is not the final version, which has this issue fixed but is not going to ship for a couple more weeks.

@AllYourBlox There’s a fairly major bug with VehicleSeats and Xbox controllers. The Left Trigger and Right Triggers no longer change the acceleration and instead causes an error. This was in a game with just a baseplate and a VehicleSeat.

It’s broken the ability for players to drive boats on Xbox with the trigger buttons in SharkBite.

image

image

3 Likes

I still have a copy of the old control script with the triggers enabled for use on Xbox Controllers. Feel free to use until they fix the issue.

3 Likes

I looked in my Studio installation and found a flag enabled (it must’ve been left by accident by some tool I’ve used). Disabling it fixed the issue - Sorry for all of that hassle.

Yes, this is a bug. There are wrapped functions in VehicleController class, within the BindContextAction calls, that are missing their function parameters. You can install the old playerscripts in this place for now, or we exempt this game from automatically using the new playerscripts until this bug is fixed. Just let me know what you’d prefer.

Okay. I’ll install the old player scripts until it’s fixed.

Issues in this version that I have found:

  • Standard camera now doesn’t ignore other players and will zoom in when moving your camera past another player.
  • Track CameraType doesn’t clip through surfaces.

Since this update, it seems that chat bubbles don’t properly stay above the player’s head. Could this be related?

image

5 Likes

Following this update, I converted my scripts to use the new module functions.
The primary reason I use this is for disabling and enabling controls as such:

require(Player:WaitForChild('PlayerScripts'):WaitForChild('PlayerModule')):GetControls():Enable()

This works fine normally, but when a player in my game resets, their controls automatically disable, and they cant move when respawn.
I don’t know if this is a bug or an issue in my game - as disabling and enabling works fine until the user resets. This is quite important for one of the features used.

1 Like

I was looking over an old game of mine and I found that this server code works fine for enabling/disabling movement:

local function toggleControls(player, bool)
	player.DevComputerMovementMode = bool and Enum.DevComputerMovementMode.UserChoice or Enum.DevComputerMovementMode.Scriptable
	player.DevTouchMovementMode = Enum.DevTouchMovementMode.Thumbstick or Enum.DevTouchMovementMode.Scriptable
end

What are the downsides to using this code over the Enable/Disable methods of the PlayerModule controls?

3 Likes

I think I’ll be using this as Double Jump is broken in my game with the new control system.

Every time I enter play solo or in-game, “Instantiating Keyboard Controller” is printed to the output. This is due to RobloxPlayerScript > ControlScript > Keyboard:

This seems to be an issue in other place:

  • “Instantiating Gamepad Controller” - Gamepad line 21
  • “Instantiating ClickToMove Controller” ClickToMoveController line 788, 834

All prints should be behind a debugPrint function which can be enabled/disabled with a with a global variable since there’s no good way to filter this out from the output, and this variable should be flipped off for release versions of the playerscripts.

Also, can we rename ClickToMoveController and BaseCharacterController to ClickToMove and Base to be consistent with other naming? (e.g. Keyboard/Gamepad)

1 Like