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 5 years ago
Edited 5 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 — 5y
0
oh im trying to make a script where you click a tool it prints it natonator63 29 — 5y
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 — 5y
0
are you saying its not working or you dont understand the event IrishStukov 20 — 5y

1 answer

Log in to vote
-2
Answered by
chesse20 -20
5 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 — 5y
0
You dont use semicolons in Lua! NorteX_tv 101 — 5y
0
We don't use semicolons in Lua language, you clearly know nothing on lua. LoganboyInCO 150 — 5y
Ad

Answer this question