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: Not cloning into StarterGUI

Previous Thread :: Next Thread 
legosonic411 is not online. legosonic411
Joined: 12 Mar 2009
Total Posts: 3660
30 Jun 2015 04:25 AM
I'm trying to somehow get a GUI visible after purchasing something that'll either clone it or make it visible, so far I've tried these.


game.Lighting.NameHide:clone().Parent.StarterGUI

game.StarterGUI.NameHide.Click.Visible = true

game:GetService("StarterGUI").NameHide.Click.Visible = true

What exactly am I doing wrong?
Report Abuse
Sevrick is not online. Sevrick
Joined: 22 Oct 2013
Total Posts: 3846
30 Jun 2015 04:27 AM
Do you mean PlayerGui?
Report Abuse
BlastAccost is not online. BlastAccost
Joined: 26 Mar 2013
Total Posts: 9642
30 Jun 2015 04:29 AM
try:

clone = game.Lighting.NameHide:clone()
clone.Parent = (player).StarterGui
clone.Visible = true
Report Abuse
Sevrick is not online. Sevrick
Joined: 22 Oct 2013
Total Posts: 3846
30 Jun 2015 04:30 AM
You mean (player):WaitForChild("PlayerGui")
Report Abuse
Sevrick is not online. Sevrick
Joined: 22 Oct 2013
Total Posts: 3846
30 Jun 2015 04:30 AM
'GUI' is in capitals, the name should be 'StarterGui'.
Report Abuse
legosonic411 is not online. legosonic411
Joined: 12 Mar 2009
Total Posts: 3660
30 Jun 2015 04:38 AM
I keep getting the error of "StarterGui isn't a valid member of Player"
Report Abuse
BlastAccost is not online. BlastAccost
Joined: 26 Mar 2013
Total Posts: 9642
30 Jun 2015 04:59 AM
Can you show us the full script?
Report Abuse
legosonic411 is not online. legosonic411
Joined: 12 Mar 2009
Total Posts: 3660
30 Jun 2015 05:01 AM
--In a local script.

script.Parent.MouseButton1Down:connect(function()

local player = game.Players.LocalPlayer

local stats = player:FindFirstChild('leaderstats')
if not stats then return end

local Cash = stats:FindFirstChild('Cash')
if not Cash then return end

if Cash.Value >= 100
then Cash.Value = Cash.Value - 100
clone1 = game.Lighting.NameHide:clone()
clone1.Parent = (player).StarterGui
clone1.Visible = true
script.Parent.Parent.bought:Play()

script.Parent.Parent.Parent.purchased.Visible = true
wait(1.5)
script.Parent.Parent.Parent.purchased.Visible = false

else if Cash.Value <= 100
then script.Parent.Parent.error:Play()
end
end
end)
Report Abuse
RelaxRobby is not online. RelaxRobby
Joined: 11 Apr 2011
Total Posts: 104
30 Jun 2015 05:13 AM
Funny.

The solution is:

NOT "StarterGui", you have to copy your Gui and put it into the player's "PlayerGui"
-------------------------------------------------------------------
if Cash.Value >= 100
then Cash.Value = Cash.Value - 100
clone1 = game:GetService("Lighting").NameHide:clone()
clone1.Parent = player.PlayerGui
clone1.Visible = true
script.Parent.Parent.bought:Play()
-------------------------------------------------------------------
And please, don't use "Lighting" to store things. Use ReplicatedStorage instead.
Report Abuse
legosonic411 is not online. legosonic411
Joined: 12 Mar 2009
Total Posts: 3660
30 Jun 2015 05:27 AM
I know @ the ReplicatedStorage, it's just a habit.

Also, the script works, however I'm trying to make it stay in the PlayerGui Permanently, how would I reflect the script to change that?

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