player = game.Players.LocalPlayer
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function (key)
for i, v in pairs(game.Players:GetChildren()) do
if key == "f" then
for i = 1,2 do
if player.Magic.Value <= player.MagicMax.Value then
player.Magic.Value = player.Magic.Value +1
end
end
end
end
mouse.KeyUp:connect(function (key)
if key == "f" then
end
end)
end)
This is the script. It has no errors. I don't know what I am doing wrong. What it is supposed to do is to increase the magic value as long as the f button is held. Instead it only increases the value by two and it does not continually do it until you let go of f. Instead you have to mash f for it to even go up.

1 comment
(Replied)