PlayerScripts - Error?
Recently, I noticed a new child of all Players called "PlayerScripts". I noticed that disabling it's scripts cause the player to stay still, something which became really useful.
Anyhow, recently, it doesn't appear anymore, causing a:
13:09:39.993 - PlayerScripts is not a valid member of Player
The question is, how can I add it back, or is there another way to stop the player from moving, that doesn't involve anchoring its torso? (I want to use the move to function on the humanoid still).
This is the current local Script inside a button:
01 | local equipTool = coroutine.create( function (tool,character) |
02 | character.Humanoid:EquipTool(tool) |
04 | tool.Unequipped:connect( function (mouse) |
05 | if equipTool = = true then |
06 | while tool.Parent ~ = character do |
08 | character.Humanoid:EquipTool(tool) |
14 | script.Parent.MouseButton 1 Down:connect( function () |
15 | local player = game.Players.LocalPlayer |
16 | local character = player.Character |
18 | player.PlayerScripts.ControlScript.Disabled = true |
20 | character.Parent = game.Workspace.Camera |
21 | character:MoveTo(game.Workspace.StandP.Position) |
22 | character.Humanoid:MoveTo(game.Workspace.Move 2 P.Position) |
23 | coroutine.resume(equipTool,player.Backpack [ "M7A3 CS Gas" ] ,character) |