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

Why does nothing happen in my Equipped event?

I have this incredibly simple script:

local tool = script.Parent
tool.Equipped:connect(function(mouse)
	print("Test")
end)

For some reason nothing gets printed when I equip the tool. Why?

6 comments

0

Use this in a LocalScript please

0

And you should use :Connect instead of :connect which is deprecated.

0

@InfernoExeuctioner What is the difference between :Connect and :connect ???

0

connect is deprecated, and Connect isn't. Although alot of people say that connect shouldn't be used, you can still use them, it's that it's not recommended to use

0

Do you have a handle in the tool? If not then check the needhandle property inside the tool.

0

actually it's deprecated because roblox is very personal with PascalCase

1 answer

Hello,

The reason your code doesn't work is because :connect() is deprecated use :Connect() instead.

Here is the fixed code:

local tool = script.Parent
script.Parent.Equipped:Connect(function()
	print('Test')
end)

~Frag

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