I have this running script:
(Along with some other things in there)
local KeyPressed = script.Parent.KeyPressed
--//Animations/--
local BloodSuck = script.BloodSuck
KeyPressed.OnServerEvent:Connect(function(Player, Key)
local character = Player.Character or Player.CharacterAdded:Wait()
local humanoid = character:FindFirstChild("Humanoid")
local BloodSuckTrack = humanoid:LoadAnimation(BloodSuck)
if Key == "G" then
BloodSuckTrack:Play()
elseif Key == "LeftShift" then
if Player:WaitForChild("Classes"):WaitForChild("Vampire").Value == true then
humanoid.WalkSpeed = 50
elseif Player:WaitForChild("Classes"):WaitForChild("Human").Value == true then
humanoid.WalkSpeed = 23
end
elseif Key == "LeftShiftEnded" then
if Player:WaitForChild("Classes"):WaitForChild("Vampire").Value == true then
humanoid.WalkSpeed = 30
elseif Player:WaitForChild("Classes"):WaitForChild("Human").Value == true then
humanoid.WalkSpeed = 16
end
end
end)
How would I make an intvalue go down while the player is running.