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

Cant click GUI on online mode? [Solved]

Asked by 9 years ago

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

Log in to vote
-2
Answered by 9 years ago

You have to use a local script while using guis.

0
Derp... Thanks, just found that out on the wiki. Orlando777 315 — 9y
0
:3 Ok... raystriker6707 30 — 9y
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. Orlando777 315 — 9y
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). BlueTaslem 18071 — 9y
Ad

Answer this question