LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 08 Nov 2014 11:34 PM |
I have these tools that have a script in them which grabs the GUI from ReplicatedStorage, which works fine. The GUI shows up. But some of the things in the GUI don't work, and others do. It's driving me crazy. Can someone help me? Is there another place I can store GUI's where they will work if a copy is made??
Here's the script that calls for the GUI from ReplicatedStorage:
function LoadGui() repeat wait() until game.Players.LocalPlayer.Character if not gui then gui = game.ReplicatedStorage.YoungBenGUI:Clone() gui.Parent = game.Players.LocalPlayer.PlayerGui print("Gui placed into player.") else return end end
function UnloadGui() gui:Destroy() gui=nil end
script.Parent.Equipped:connect(function() LoadGui() end)
script.Parent.Unequipped:connect(function() UnloadGui() end) |
|
|
| Report Abuse |
|
|
demon8845
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 335 |
|
| |
|
|
| 08 Nov 2014 11:37 PM |
| If there are things in the gui that don't work then it's not the tools we need to be seeing. Find out what isn't working and post those scripts instead. |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 09 Nov 2014 12:30 AM |
| @xiaoxiao181 By that I meant certain things don't work when the tool is taking the GUI from ReplicatedStorage. But when I use it inside of Studio, or in StarterGUI, everything works. |
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 09 Nov 2014 01:05 AM |
| Yes. I tried changing it to a script but then it doesn't get the GUI from ReplicatedStorage. |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
| |
|
|
| 09 Nov 2014 11:13 AM |
| Instead of having the gui in ReplicatedStorage, just put it into the tool. It won't show up in the Tool. |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
| |
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 09 Nov 2014 07:49 PM |
These are two of the scripts inside of the GUI if it helps:
page = script.Parent.Page function close() script.Parent.C1.Visible = false end
function onChanged() if script.Parent['C'..page.Value] then close() script.Parent['C'..page.Value].Visible = true else return end end
page.Changed:connect(onChanged)
and
for i,c in pairs(script.Parent:GetChildren()) do if c:IsA("ImageButton") then c.MouseButton1Click:connect(function() p = script.Parent.Parent.Parent.Parent.Parent wait(0.25) for _,v in pairs(p.Character:GetChildren()) do if v:IsA("Tool") and v.Name~='YoungBensOmnitrix' then v:Destroy() end end for _,v in pairs(game.ServerStorage.GameTools[c.Suit.Tool.Value]:GetChildren()) do if v:IsA("HopperBin") or v:IsA("Tool") then if p:FindFirstChild'Backpack' then v:clone().Parent = p.Backpack end end end end) end end |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 09 Nov 2014 10:56 PM |
| Someone please help this is bothering me :C |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
| |
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 10 Nov 2014 02:09 PM |
| Please someone I really need help with this.. |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
| |
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
| |
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 10 Nov 2014 06:44 PM |
| Should I just make a new topic?.. :/ |
|
|
| Report Abuse |
|
|