Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

When they activate it and click 2 times I want it to print something but not working?

it gives me a error

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()
        if mouse.MouseButton1Click then
            clicks = clicks + 1
        end
    if clicks == 2 then
        print("Clicked two times.")
    end
    end)
end

the error is 09:02:22.129 - MouseButton1Click is not a valid member of PlayerMouse

1 answer

✓ Accepted answer

Instead of using MouseButton1Click, try using Button1Down

This discussion is preserved as it was. New answers, comments, and votes are closed.