DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 May 2015 06:41 AM |
| I have been trying to make a script to where if your in a certain group a GUI visible is false. I dont know how to 100% make it though. Can someone help me? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 10 May 2015 06:42 AM |
http://wiki.roblox.com/index.php?title=API:Class/Player/IsInGroup http://wiki.roblox.com/index.php?title=API:Class/GuiObject/Visible |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 May 2015 06:45 AM |
| The GUI Object page doesnt work |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
|
| 10 May 2015 06:47 AM |
It gives you enough information.
GUIObject.Visible = boolean (true or false) |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 May 2015 06:51 AM |
I got this and it is not working:
game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer:IsInGroup(1203332) then script.Parent.OccCivilian.Visible = true script.Parent.CivilianCover.Visible = false end end)
Also one of my other scripts dont work. But it works under studio:
local StarterGui = game:GetService('StarterGui') StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 10 May 2015 06:51 AM |
| the second one needs to be localscript |
|
|
| Report Abuse |
|
|
|
| 10 May 2015 06:52 AM |
| I hope you know that you can't use PlayerAdded in a localscript.. |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 May 2015 06:55 AM |
@King - Where should I put it when I have it in a local script? Worskapce?
@Epic - I have that script in as a LocalScript |
|
|
| Report Abuse |
|
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
| |
|
|
| 10 May 2015 06:59 AM |
Put this in a localscript ( LocalScripts go in PlayerGui/StarterPack ):
Player = game.Players.LocalPlayer GUI = Player:WaitForChild("PlayerGui"):WaitForChild("Gui Name") -- Edit this if Player:IsInGroup(1203332) then GUI:WaitForChild("OccCivilian").Visible = true GUI:WaitForChild("CivilianCover").Visible = false end
|
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 May 2015 07:04 AM |
| I have the script you gave me above in a localscript, under StarterPack and I edited the things but its still not working |
|
|
| Report Abuse |
|
|
|
| 10 May 2015 07:05 AM |
You can figure the rest out. I've given you enough. http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 May 2015 07:10 AM |
| Well thanks for some help. But im not gonna be spending like 5 hours to read through tutorials when someone can just come here and help me |
|
|
| Report Abuse |
|
|
Saldor010
|
  |
| Joined: 20 Sep 2010 |
| Total Posts: 1035 |
|
|
| 10 May 2015 08:14 AM |
| Is it giving you any errors? |
|
|
| Report Abuse |
|
|