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

3 comments

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.

0

I do already have variable above, I just did not show the whole script.

0

I can show the whole script if you want.