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

OnEqiupped script not workins despite no errors?

Basically this is a normal script inside of a tool, it is very basic and should work, but it dosent, I don't get anything printed in the output, signifying it has not worked. but there are no error in the entire script, please help!

local Tool = script.Parent
local function OnEquipped(mouse)
print("Eqiupped")
end

Tool.Equipped:connect(OnEquipped)

local function OnUnequipped()
print("UnEqiupped")	
end
Tool.Unequipped:connect(OnUnequipped)

1 comment

0

I ran the script in roblox studio and there was no issues, do you have a part named "Handle"?

1 answer

✓ Accepted answer

Lowercase "C" in ":connect" is deprecated so change the C of ":connect" to uppercase so it becomes :Connect

also you dont need local function

local Tool = script.Parent
function OnEquipped(mouse)
print("Eqiupped")
end
 
Tool.Equipped:Connect(OnEquipped)
 
function OnUnequipped()
print("UnEqiupped") 
end
Tool.Unequipped:Connect(OnUnequipped)

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