I clone my Tool and my animation = nill (pls help)

  1. What do you want to achieve? 1. So i need my Animation fix
    if i clone my tool from serverStorage he dosen’t see 2. if i get 2 tools and just drink only 1 the all delet()
local Drink_Animation = script.Parent.Drink_Animation

  1. What is the issue? Hare Video
    Problem 1- https://youtu.be/fi9OZYAwyXw
    Problem 2- https://youtu.be/L09xiY8GlAc
    Problem If i have tool in backpack - https://youtu.be/MSiEeG1Olig

Its script Tool

local Cup = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("EventWalkSpeed16")
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local Animator = hum:WaitForChild("Animator")
local Drink_Animation = script.Parent.Drink_Animation
local track = Animator:LoadAnimation(Drink_Animation)
local uis = game:GetService("UserInputService")
local isFinished = true
local drinkKey = Enum.KeyCode.E




local function PlayAnim(Input)
	if Input.KeyCode == drinkKey and isFinished then
		Event:FireServer()
		isFinished = false
		track:Play()
		wait(track.Length/4)
		track.Stopped:Wait()
		script.Parent:Destroy()
		isFinished = true
	end
end

uis.InputBegan:Connect(PlayAnim)

My tool if you wanna help me (Sorry guys its not good work now. maybe later i fix this)
3. What solutions have you tried so far? I see whare more In youtobe but its dosen’t help
(Guys i never use Tools so i have more error now If you help me and say why hare error i gave +Respect, Thx to help me.)

1 Like

Use local Drink_Animation = script.Parent:WaitForChild("Drink_Animation")

Its probably because it didn’t load in yet.

1 Like

Have any idea how to fix
Problem if have tool in backpack
@cheesy_roblox190

Why you waiting 1/4 of the animations length?
Or maybe the code over yields

Well am wiat activate Another Code But problem its If i copy like 10 tools But if i Use Only 1
Idk Why but 10 tools activated and the all delet i dont no why.

Describe issue in full and with good grammar please. I will be pleased to help you find yours solution

Well hare the problem - https://youtu.be/57FxlGUFH5w @sonic_848

Oh so the problem is tha they all Dissapear.
Whats the script.parent?

Yes buy i dont no how to fix it i dont have any idea
but if you see In Video If you have in BackPack 2,3, or 4 and any more tools But if you use ONLY 1 the “Drinks Used All”

Script.Parent Its mean Tool

Try removing the destroy line and see gow the behaviour changes

Well i just test The all Used.
Have any idea? and i remove Delet

The issue isn’t the script rather something else… Because when you removed the destroy line nothing should get destroyed

The not destroy
I remove

Script.Parent:Destroy()

and the not delet but the all Used Item its the problem

So when line isnt there nothing gets destroyed but when its there the other ones get deleted.

Is the script also under the tool or is it on a different location?

No its Another Problem If player.BackPack.Tools = 5 (Or any number)
Then if Play Udes Tool (only 1)

ToolUsed All (alll 5)

Hey, I just tested your script and it works fine.

I suppose if you wish to destroy the tool upon use, you could do this:

Localscript:

local Cup = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("EventWalkSpeed16")
-- Rest of variables here

local function PlayAnim(Input)
	if Input.KeyCode == drinkKey and isFinished then
		Event:FireServer(Cup)
		-- Rest of code here
	end
end

Serverscript (the Script_EventWalkSpeed16):

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("EventWalkSpeed16")

Event.OnServerEvent:Connect(function(plr, cup)
	local Char = plr.Character 
	local Hum = Char:WaitForChild("Humanoid")
	if Hum.WalkSpeed == 25 then
		print("No.")
	else
		-- Rest of code here
		cup:Destroy()
	end
end)

Don’t worry about your grammar. You’re trying your hardest, and perhaps English isn’t your first language. Stay safe, and good luck.

1 Like

Wdym “dont worry about grammar” grammar is essential in direct, easy communication… stop encouraging bad grammar

Yeah but you can’t directly learn a whole new language in 10 seconds. I bet you can’t even do that.

Anyways, make sure the animator is inside the tool, and that you are refering to it properly.

1 Like

Who said anything about him not being able to speak English fully? I simply said for him to be more clear

Okay, you do not need to create a argument. I get it, he does not know how how to speak English fluently. But, being negative towards someone who is still learning is really rude. Its best not to create an argument here.

1 Like