Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

PlayerScripts - Error?

Asked by 9 years ago

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:

local equipTool = coroutine.create(function(tool,character)
    character.Humanoid:EquipTool(tool)

    tool.Unequipped:connect(function(mouse)
        if equipTool == true then
            while tool.Parent ~= character do
                wait()
                character.Humanoid:EquipTool(tool)
            end         
        end
    end)
end)

script.Parent.MouseButton1Down:connect(function()
    local player = game.Players.LocalPlayer
    local character = player.Character

    player.PlayerScripts.ControlScript.Disabled = true

    character.Parent = game.Workspace.Camera
    character:MoveTo(game.Workspace.StandP.Position)
    character.Humanoid:MoveTo(game.Workspace.Move2P.Position)
    coroutine.resume(equipTool,player.Backpack["M7A3 CS Gas"],character)
end)

1 answer

Log in to vote
1
Answered by 9 years ago

You can't add it back. It's an experimental feature which should be released very soon. http://wiki.roblox.com/index.php?title=PlayerScripts

Edit: The purple banner was removed from the wiki page, which should suggest it is going to be a thing any day now.

To stop a player moving, you can do this: character:MoveTo(character.Torso.Position) A better method is: Player:Move(Vector3.new(0,0,0))

0
Thanks, apparently I was able to recover the scripts and I'm working on a patch for mine right now. devSparkle 84 — 9y
0
Aparently, it was launched but rolled back due to issues: https://twitter.com/RbxDevTips/status/597958453299171328 devSparkle 84 — 9y
Ad

Answer this question