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

im kinda confused on the event? need to print something when tool is equipped and player clicks

local mouse = game.Players.LocalPlayer
local tool = script.Parent
tool.Equipped:Connect(function(mouse)
	print("yes")
end)

5 comments

0

Can you explain in more detail what this question is or it will be moderated

0

oh im trying to make a script where you click a tool it prints it

0

Please add a description o.o Also check the events in the tool there is one for when the player clicks.

0

are you saying its not working or you dont understand the event

1 answer

local mouse = game.Players.LocalPlayer;
local tool = script.Parent;
tool.Equipped:Connect(function(mouse)
    print("yes");
end)

you forgot the semicolons

3 comments

1

Lua is not like other languages where lines are separated via semicolon.

0

You dont use semicolons in Lua!

0

We don't use semicolons in Lua language, you clearly know nothing on lua.

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