Player = script.Parent.Parent
repeat wait() until Player.Character
local char = Player.Character
local hum = char.Humanoid
local running = false
local UIS = game:GetService("UserInputService")
local idle = game.Lighting:WaitForChild("Animation"):WaitForChild("Idle")
UIS.InputBegan:Connect(function(Input, Chat)
	if Input.KeyCode == Enum.KeyCode.F and not Chat and hum.Health >= 0 then
		if running == false then

			idle:Play()
			running = true
		elseif running == true then

			idle:Stop()
			running = false
		end
	end
end)

its looks okay to me but when i run it the idke doesnt play