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

Cant click GUI on online mode? [Solved]

This is a normal script, not a local script. The place is a 1 player server and the objects/guis and scripts are in workspace. the GUI's are surface gui's and when clicked in Studio mode, they work. Should I perhaps use a Local script instead?

Here's the simple script.

EDIT: I placed it in a local script in the Starter GUI, and it still wont work .-. EDIT#2: Found the problem, but I don't see why this worked in solo mode. I forgot to add the fact that I manipulate the users camera. They're technically looking through a brick and I'm guessing that bricks in the way of the GUI.

EDIT#3: SOLVED...It was the camera that was blocking them. So you CAN use normal scripts with GUI's. Lol, the more you know...

workspace.GUI.Right.SurfaceGui.Levels.MYGEETO.MouseButton1Down:connect(function()
workspace.Map.Value = 13
script.Parent.TextColor3 = Color3.new(255,0,0)
print("clicked")
end)

1 answer

✓ Accepted answer

You have to use a local script while using guis.

4 comments

0

Derp... Thanks, just found that out on the wiki.

0

:3 Ok...

0

Wait, it still doesnt work... I put the script in a local script and placed it in the players GUI, I updated the script in the description.

1

GUIs DO NOT require LocalScripts. Usually it makes sense to use them, but they aren't necessary. Sometimes it would be much more convenient to use a Script instead of a LocalScript (e.g., when processing transactions).

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