Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make a charging effect?STILL HAVE QUESTIONS]

wait(0.01)
local enabled = true
Player = game.Players.LocalPlayer
character = Player.Character
mouse = Player:GetMouse()
run = game:GetService("RunService")
Humanoid = Player.Character.Humanoid
Nen = Player.Nen

function Charging(key)
	key = key:lower()
	if key == "0" then
		if Nen.Value <= 100 then
			Nen.Value = Nen.Value +1
		end
	end
end

mouse.KeyDown:connect(Charging)

If i hold left shift how do i make it go up by 1 every second that i hold shift down?

1 answer

✓ Accepted answer
mouse.KeyDown:connect(function(key)
    keysDown[key:lower()] = true
end)

mouse.KeyUp:connect(function(key)
    keysDown[key:lower()] = false
end)

use this to let the script know when you're not holding shift down

How to add +1


while wait(.1) do
        if Nen.Value <= 100 then
            Nen.Value = Nen.Value +1
        end
    end

3 comments

0

Yeah but,how do i make the number value go up by 1 every 0.1?

0

You need a while true loop, here. Ill edit.

0

Players.kingalpha1.Backpack.Charge:23: attempt to index global 'keysDown' (a nil value)

This discussion is preserved as it was. New answers, comments, and votes are closed.