I've been trying to make this work for a long time now but it just does. (Does a push up once and the letters don't change)
for i = 1, 15,1 do
Animation = script.Parent.Parent.Parent.PushUps
AnimationTrack = plr.Character.Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
print("Playing")
number = 0
number = math.randomseed(1,4)
if number == 1 then
key = "x"
plr.PlayerGui.FistMaster.PushUps.TextLabel.Text = "X"
end
if number == 2 then
key = "y"
plr.PlayerGui.FistMaster.PushUps.TextLabel.Text = "Y"
end
if number == 3 then
key = "k"
plr.PlayerGui.FistMaster.PushUps.TextLabel.Text = "K"
end
if number == 4 then
key = "t"
plr.PlayerGui.FistMaster.PushUps.TextLabel.Text = "T"
end
wait(1)
plr:GetMouse().KeyDown:connect(function(k)
if k == key and pushUpsEnabled == true then
presses = presses + 1
print(presses)
else
presses = 0
end
end)
end

1 comment
Don't use KeyDown, tab your code correctly, and please explain more. Do you get any errors? What lines do you think the problem might be?