local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local toolEvent = game.ReplicatedStorage.BearTrapEvent
-- 애니메이션 로드
local animator = character:FindFirstChildOfClass("Humanoid"):FindFirstChildOfClass("Animator")
local animation = animator:LoadAnimation(script.Animation)
tool.Equipped:Connect(function()
animation:Play()
humanoid.WalkSpeed = 8
end)
tool.Unequipped:Connect(function()
animation:Stop()
humanoid.WalkSpeed = 14
end)
tool.Activated:Connect(function()
humanoid.WalkSpeed = 14
animation:Stop()
toolEvent:FireServer(character:FindFirstChild("HumanoidRootPart"))
tool:Destroy()
end)
At first, the animation fails to load and the error appears as shown in the attached image. It’s a local script in Tool, how do I fix it?