Code is located in a localscript / local ItemButton = script.Parent.ItemsButton
ItemButton.MouseButton1Click:connect(function() print "worked" end) / If I could also get be told how to resolve this I'd appreciate it.
Code is located in a localscript / local ItemButton = script.Parent.ItemsButton
ItemButton.MouseButton1Click:connect(function() print "worked" end) / If I could also get be told how to resolve this I'd appreciate it.
If the script is inside of the button then just use script.Parent instead of script.Parent.ItemsButton. Also check for any spelling mistakes.
local ItemButton = script.Parent
ItemButton.MouseButton1Click:Connect(function(check)
print("It worked!")
end)
Try putting this script inside the button.
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
This didn't fix it, I noticed that the issue is the "MouseButton1Click". Basically when I start typing "Mouse" after "ItemButton." it'll give different options of what can be typed, and "MouseButton1Click" isn't one of them. That's kind of the issue here, don't have a clue on how to resolve it though.
Can you screenshot the list of options?
are u sure ur button is a TextButton?
and try print("It worked")
I changed the button that will get clicked to a text button, and it works now. Didn't know that for "MouseButton1Click" to work it requires a textbutton, good to know. Thankyou for telling me, appreciate the help!
please, UpVote my comment if I helped.