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?
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?
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.
6 comments
Use this in a LocalScript please
And you should use :Connect instead of :connect which is deprecated.
@InfernoExeuctioner What is the difference between :Connect and :connect ???
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
Do you have a handle in the tool? If not then check the needhandle property inside the tool.
actually it's deprecated because roblox is very personal with PascalCase