I am trying to make a game and one of my tools can't do damage and comes up this error some help
OnFireServer(Script)
Remote = script.Parent:FindFirstChild("OnDamage")
Remote.OnServerEvent:Connect(function(Player,Damage,part)
part.Parent:FindFirstChild("Humanoid"):TakeDamage(Damage)
end)
Action(LocalScript)
Player = game.Players.LocalPlayer
game.Workspace:WaitForChild(Player.Name)
Stone = script.Parent
Animation = game.Lighting.Animations.StoneSwing
Track = Player.Character.Humanoid:LoadAnimation(Animation)
animation = false
Debounce = false
Stone.Activated:Connect(function()
if Debounce == false then
Debounce = true
Track:Play()
touch = Stone.Handle.Touched:Connect(OnTouch)
wait(0.3)
animation = true
wait(0.8)
animation = false
wait(0.2)
Debounce = false
end
end)
function OnTouch(part)
if part.Parent:FindFirstChild("Humanoid") ~= nil and part.Parent.Name ~= Player.Name and animation == true and Hitted == false then
Hitted = true
Damage = 10
Stone.OnDamage:FireServer(Damage, part)
wait(0.4)
Hitted = false
end
end
Is my first time using this website!

3 comments
i'm actually really lazy so it would be cool if you could tell which line has the error
Its on OnFireServer(Script) Line 1
Stone is the name of the tool