DrinkSound is not a valid member of LocalScript “Players.Auevi.Backpack.Coffee.LocalScript”
-- Services
local Players = game:GetService('Players')
-- Accessing the local player
local Player = Players.LocalPlayer
local tool = script.Parent
local drink_sound = script.DrinkSound
local clicked = false
tool.Activated:Connect(function()
if clicked == false then
clicked = true
drink_sound:Play()
local humanoid = tool.Parent:FindFirstChild("Humanoid")
humanoid.Health = humanoid.Health + 5
task.wait (2)
-- Find tool in StarterGear
local StarterTool = Player.StarterGear:FindFirstChild(tool.Name)
if StarterTool then
StarterTool:Destroy()
end
-- Destroy tool in hands
tool:Destroy()
end
end)