Izzik
|
  |
| Joined: 28 Jan 2010 |
| Total Posts: 45 |
|
|
| 28 Nov 2013 01:08 AM |
When in solo mode, this script works fine. On server, things get a little wierd for some reason...
The problem is that the GUI is being created *twice* in the PlayerGui...as you can see, the GUI gets given a parent only once...what on earth is making it double up when on a server?
The below code is in a HopperBin being used as a tool. Thanks for any help.
-----------
ison = false local Tool = script.Parent
function makegui(main) main = Instance.new("ScreenGui") main.Name="CloneMain"
return main end
function onSelected(mouse) gui = makegui(var) gui.Parent=Tool.Parent.Parent.PlayerGui ison = true
end
function onDeselected(mouse) if ison==true then
gui:remove() ison = false end
end
Tool.Selected:connect(onSelected) Tool.Deselected:connect(onDeselected)
---- |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 02:42 AM |
Well you see, the difference between Solo and Server is,
Solo: Every script will be as if it is a Local Script
Server: Script is Script Local Script is Local Script |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 03:20 AM |
Basically the above person is saying Put it in a localscript |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 03:22 AM |
| Thank you for simplicizing it. :) |
|
|
| Report Abuse |
|
|
Izzik
|
  |
| Joined: 28 Jan 2010 |
| Total Posts: 45 |
|
|
| 28 Nov 2013 11:41 AM |
| Brilliant! This did the trick, thanks both. |
|
|
| Report Abuse |
|
|