This is the Local Script that is located in a folder , which is located in a tool.
"19:46:26.925 - Players.Tizzel40.Backpack.DefultCombat.Scripts.ClickFire:4: attempt to index local 'char' (a nil value)"
local tool = script.Parent.Parent
local player = game.Players.LocalPlayer
local char = player.Character
local hum = char:WaitForChild("Humanoid")
local mouse = player:GetMouse()
local uis = game:GetService("UserInputService")
local Remotes = tool:WaitForChild("Remotes")
----------TOOL SETTING
local inuse = false
local cooldown = .7
local Damage = math.random(5,10)
------------------------------
local usedright = false
local IdleAnimation = hum:LoadAnimation(tool:WaitForChild("Animations").IdleAnimation)
tool.Equipped:Connect(function()
IdleAnimation:Play()
end)
tool.Unequipped:Connect(function()
IdleAnimation:Stop()
end)
tool.Activated:Connect(function()
if inuse == false then
inuse = true
if usedright == false then
usedright = true
Remotes.CombatEvent:FireServer(Damage,"RightHand")
wait(cooldown)
inuse = false
else
Remotes.CombatEvent:FireServer(Damage,"LeftHand")
wait(cooldown)
inuse = true
end
end
end)

2 comments
for some reason the code blocks didnt work for me???
The Problem is , Since the character is somehow "nil" the animation wont play........, :(