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
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.)
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.
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”
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.
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.