when the tool is activated and click 2 times, I want it to print the stuff I want it to but it won't work
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local starterPack = game:GetService("StarterPack") local tool = starterPack:WaitForChild("Tool") if tool then tool.Activated:Connect(function(activated) if mouse.MouseButton1Click == 2 then print("clicked 2 times") end end) end
You should use an amount of clicks variable that counts the clicks.
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local starterPack = game:GetService("StarterPack") local tool = starterPack:WaitForChild("Tool") clicks = 0 if tool then tool.Activated:Connect(function(activated) if mouse.Button1Down then clicks = clicks + 1 end if clicks == 2 then print("Clicked two times.") clicks = 0 end end) end