Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
Edited 6 years ago
local mouse = game.Players.LocalPlayer
local tool = script.Parent
tool.Equipped:Connect(function(mouse)
    print("yes")
end)

0
Can you explain in more detail what this question is or it will be moderated User#5423 17 — 6y
0
oh im trying to make a script where you click a tool it prints it natonator63 29 — 6y
0
Please add a description o.o Also check the events in the tool there is one for when the player clicks. User#5423 17 — 6y
0
are you saying its not working or you dont understand the event IrishStukov 20 — 6y

1 answer

Log in to vote
-2
Answered by
chesse20 -20
6 years ago
local mouse = game.Players.LocalPlayer;
local tool = script.Parent;
tool.Equipped:Connect(function(mouse)
    print("yes");
end)

you forgot the semicolons

1
Lua is not like other languages where lines are separated via semicolon. User#19524 175 — 6y
0
You dont use semicolons in Lua! NorteX_tv 101 — 6y
0
We don't use semicolons in Lua language, you clearly know nothing on lua. LoganboyInCO 150 — 6y
Ad

Answer this question