generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Onclick screengui not working in server, does in solo

Previous Thread :: Next Thread 
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
15 May 2016 04:52 PM
function onClick()
print("Click")
end

script.Parent.MouseButton1Click:Connect(onClick)

thanks

i dont think i need to mess with adoree for this since i dont care who clicks
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
15 May 2016 04:52 PM
MouseButton1Click works only on the client, not the server.
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
15 May 2016 04:57 PM
ah. any easy alternatives or should I work it out
Report Abuse
GetTheJobDone is not online. GetTheJobDone
Joined: 20 Apr 2016
Total Posts: 3008
15 May 2016 04:58 PM
1. There's no reason to have a script work with a GUI.

2. Working in Studio but not in a server is always because all scripts act as localscripts in Play Solo.


Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
15 May 2016 04:59 PM
An easy alternative is having the gui controls done on the client. This way you have access to the user's inputs (including keyboard and mouse).
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
15 May 2016 04:59 PM
1. what
Report Abuse
GetTheJobDone is not online. GetTheJobDone
Joined: 20 Apr 2016
Total Posts: 3008
15 May 2016 05:00 PM
You only use LocalScripts client-side, never scripts.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
15 May 2016 05:00 PM
thanks locard,

justgetitdone why would you not want guis to interact with scripts
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
15 May 2016 05:03 PM
I'm confused is this a new ish thing?

There are posts like this

https://forum.roblox.com/Forum/ShowPost.aspx?PostID=128954569

and i have a post from awhile asking how to get player from a click on a surface gui and it was not possible although you could register their clicks
Report Abuse
GetTheJobDone is not online. GetTheJobDone
Joined: 20 Apr 2016
Total Posts: 3008
15 May 2016 05:03 PM
Surface GUIs are very different from screen GUIs.


Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
15 May 2016 05:10 PM
very true and i messed up my title, im working with a surface gui

on my other thread 2 years ago i made the same mistake
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image