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

Simple MouseButton1Click not working?

Asked by 3 years ago

Apparently, this 3 line button click detector isn't working. Here's the code:

script.Parent.MouseButton1Click:Connect(function()
    print("Working")
end)

Note that the button is in game.Workspace.Part.SurfaceGui.Frame.Frame

Any help will be appreciated!

0
is this a localscript? in that case localscripts cannot run in the workspace. Elixcore 1337 — 3y
0
Oh ok, so would you have any advice on how to make it work? TheEggsquidzidBoi 38 — 3y
0
Put it somewhere in the client, for example the StarterGui. Nickuhhhhhhhhhhhhhhh 834 — 3y
0
Oh got it! Thanks! TheEggsquidzidBoi 38 — 3y

1 answer

Log in to vote
0
Answered by
iivSnooxy 248 Moderation Voter
3 years ago
Edited 3 years ago

Insert a ScreenGUI in StarterGuithen a TextButton in The ScreenGUI Then put this code in...

script.Parent.MouseButton1Click:Connect(function()
   print(“Yay the script is working now”)
   else
   print(“Awww man it’s not working”)
   end
end)
Ad

Answer this question