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

How do i make a player get killed if they stand still for to long?

Asked by 4 years ago
Edited 4 years ago

Here's my attempt.

local plr = game.Players.LocalPlayer
    local char = game.Players.LocalPlayer.character



    while true do
        if plr.Character.Humanoid.Torso.Velocity < 5 then
        game.workspace.Player.Humanoid.Health = 0
        end
        wait(1)
    end
0
The Player isn't a valid member of workspace. Nor is 'workspace' a valid member game; it's 'Workspace' via that pathway. If you already have a Player Object declared, as seen on line 2, then use that: plr.Character.Humanoid. Ziffixture 6913 — 4y
0
I do already have variable above, I just did not show the whole script. larssnakes 24 — 4y
0
I can show the whole script if you want. larssnakes 24 — 4y

Answer this question