local tool = script.Parent
local isScriptRunning = false
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local animation = ReplicatedStorage:FindFirstChild("eatingAnim")
assert(animation, "Animation not found in ReplicatedStorage")
tool.Activated:Connect(function()
if isScriptRunning then
print("Another script is already running.")
return
end
isScriptRunning = true
print("Apple tool activated. Running script...")
local player = Players:GetPlayerFromCharacter(tool.Parent)
if player then
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action
animationTrack:Play()
animationTrack.Stopped:Connect(function()
print("Animation has stopped playing.")
end)
end
end
task.wait(0.5)
isScriptRunning = false
print("Script finished.")
end)
Meant to connect to "eatingAnim" which is an animation under ReplicatedStorage, and play on the character of the person who used it. Please, someone help.

** You are now Level 1! **