Hi! So I ran into an error while scripting an animation and aura turning on keybind (its a localscript). I tried to make a boolean change values, but it gave me an error. Here is my script:
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Event = game.ReplicatedStorage:WaitForChild("AuraOn")
local Toggel = false
local humanoid = Character:WaitForChild("Humanoid")
local uis = game:GetService("UserInputService")
local value = game.ServerStorage.IsResistant
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://0"
function onKeyPressed(inputObject, gameProcessEvent)
if inputObject.KeyCode == Enum.KeyCode.K then
humanoid:LoadAnimation(anim):Play()
end
if Toggel == false then
Toggel = true
Event:FireServer(Character,true)
end
value.Value = true
end
uis.InputBegan:Connect(onKeyPressed)
(Dont mind the animation id)
Here is my explorer for āIsResistantā.