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

OnEqiupped script not workins despite no errors?

Asked by 5 years ago

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!

01local Tool = script.Parent
02local function OnEquipped(mouse)
03print("Eqiupped")
04end
05 
06Tool.Equipped:connect(OnEquipped)
07 
08local function OnUnequipped()
09print("UnEqiupped")
10end
11Tool.Unequipped:connect(OnUnequipped)
0
I ran the script in roblox studio and there was no issues, do you have a part named "Handle"? XxPatriotFinitexX 1 — 5y

1 answer

Log in to vote
1
Answered by
AltNature 169
5 years ago

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

also you dont need local function

01local Tool = script.Parent
02function OnEquipped(mouse)
03print("Eqiupped")
04end
05 
06Tool.Equipped:Connect(OnEquipped)
07 
08function OnUnequipped()
09print("UnEqiupped")
10end
11Tool.Unequipped:Connect(OnUnequipped)
Ad

Answer this question