WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
|
| 12 Aug 2017 07:25 AM |
In-game that is, I have made them a local script which then lead to one button working (the button that opens the gui) then the gui doesn't work, I really really really need help because it took me ages to script
|
|
|
| Report Abuse |
|
|
scp900
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 21 |
|
|
| 12 Aug 2017 07:38 AM |
| Could you post one of the scripts for us to see and point out your errors |
|
|
| Report Abuse |
|
|
WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
|
| 12 Aug 2017 07:42 AM |
I have a multiple scripts but here are some that didn't work and one that did work.
working script : everything = game.Players.LocalPlayer.PlayerGui.Main.everything open = game.Players.LocalPlayer.PlayerGui.Main.open.obutton
open.MouseButton1Click:connect(function() everything.Visible = true open.Visible = false end)
scripts that didn't work : buc = game.Players.LocalPlayer.PlayerGui.Main.everything.buandwuclothing ac = game.Players.LocalPlayer.PlayerGui.Main.everything.armyclothes ah = game.Players.LocalPlayer.PlayerGui.Main.everything.armyhats buh = game.Players.LocalPlayer.PlayerGui.Main.everything.buandwuhats usec = game.Players.LocalPlayer.PlayerGui.Main.everything.usections regs = game.Players.LocalPlayer.PlayerGui.Main.everything.regulations regstext = game.Players.LocalPlayer.PlayerGui.Main.everything.regulationstext bck = game.Players.LocalPlayer.PlayerGui.Main.everything.back
regs.MouseButton1Click:connect(function() buc.Visible = false ac.Visible = false ah.Visible = false buh.Visible = false usec.Visible = false regstext.Visible = true regs.Visible = false bck.Visible = true end)
and
everything = game.Players.LocalPlayer.PlayerGui.Main.everything open = game.Players.LocalPlayer.PlayerGui.Main.open.obutton close = game.Players.LocalPlayer.PlayerGui.Main.everything.close
close.MouseButton1Click:connect(function() everything.Visible = false open.Visible = true end)
and so many more
|
|
|
| Report Abuse |
|
|
scp900
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 21 |
|
|
| 12 Aug 2017 08:00 AM |
Idk if this will work but this is what I used-
plr = script.Parent.Parent.Parent.Parent.Parent.Parent
plr.leaderstats.Cookies.Value
Instead of players try making a word that will equal players such as
Player = script.Parent.Parent.Parent.Parent.Parent.Parent
it would turn it into
Player = script.Parent.Parent.Parent.Parent.Parent.Parent
This is scripted for my game so you have to be creative |
|
|
| Report Abuse |
|
|
scp900
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 21 |
|
|
| 12 Aug 2017 08:01 AM |
| I meant Player.leaderstats.Cookie.Value |
|
|
| Report Abuse |
|
|
WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
| |
|
WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
|
| 12 Aug 2017 08:23 AM |
| I get it but how does that help my scripts |
|
|
| Report Abuse |
|
|
WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
| |
|
|
| 12 Aug 2017 10:01 AM |
| where are your scripts located. just asking cause recently iv been having issues targeting Gui's in large scripts when i include a Model Target also when the script is located in my StarterGui |
|
|
| Report Abuse |
|
|
WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
| |
|
WILDjake4
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 176 |
|
| |
|
|
| 14 Aug 2017 06:49 AM |
so your scripts are inside your buttons great that doesn't tell me anything how is the architecture of your layout setup is whats im asking like is it in the StarterGui the Workspace or the ServerScriptService
i can already tell by your script that all your Gui's are located in the StarterGui but i need to know where the script that is targeting everything to open it located
also scp900's tip only applies if your double mapping an already existing variable like say it you were using "Players" as a local variable then it may cause a few weird errors if you use Player as a Variable it shouldn't cause any issues simply because its not Parented to any preexisting Statement |
|
|
| Report Abuse |
|
|