I am trying to make a keybind toggle for an aura, it’s showing no script error but nothing happens when I try to execute it while testing.
I am pretty new to scripting, planning on learning soon but I got this script “done” with reference of another script which has aura toggle by button.
I haven’t tried any solutions because well, clarified above; new to scripting. So if anyone could give me an advice or see what’s wrong with the script, greatly would help!
I do not ask for anyone to remake the script ENTIRELY, I just need a bit of help to see what to add to make the script work properly.
local auraEvent = game.ReplicatedStorage.AuraEvent
local toggle = false
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = player.Character or player.CharacterAdded:Wait()
if input.KeyCode == Enum.KeyCode.K then
toggle = true
auraEvent:FireServer(char)
else
toggle = false
char.HumanoidRootPart.Effect:Destroy()
end