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: SurfaceGui Buy button?

Previous Thread :: Next Thread 
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 07:46 PM
I'm trying to make it so that when you click on the text button in a "surface gui" it spawns a car. The script works in a regular gui but not in the surface gui?




local model = game.ServerStorage.Car1
local Cash = game.Players.LocalPlayer.leaderstats.Cash
function onClicked()
if Cash.Value >= 50 then
Cash.Value = Cash.Value - 50
local c = model:Clone()
wait()
c.Parent = game.Workspace
c:MakeJoints()
end
end
script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 08:00 PM
.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Jan 2015 08:01 PM
You have the SurfaceGui in StarterGui or PlayerGui, right?
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Jan 2015 08:01 PM
LocalScripts won't run from workspace
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Jan 2015 08:02 PM
@Jarod

Why would he have it in startergui,

its a surfacegui
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 08:03 PM
The surface gui is in a brick
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Jan 2015 08:03 PM
LocalScripts won't run from there
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Jan 2015 08:09 PM
Put it in StarterGui so that it is local.
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 08:11 PM
I put it in screengui but now it the button isn't clickable
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Jan 2015 08:13 PM
No, I mean put the SurfaceGui in StarterGui. Make sure you set its Adornee though.
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 08:17 PM
Ok so I have the surface gui in a part.

I put the part into "startergui"

It shows up

But it's not clickable
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Jan 2015 08:25 PM
Does it have a TextButton in it?

Just making sure :)
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 08:27 PM
Yea it's the text button that isn't working,


The text button has the script and its in surface gui

The button isn't clickable when its in stater gui
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 11:00 PM
?
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
24 Jan 2015 11:04 PM
1) put surfacegui in startergui (not the part, just the surfacegui)
2) paste this in command bar

game.StarterGui.SurfaceGui.Adornee = game.Workspace.Part
edit "SurfaceGui" to your name of it and edit "Part" to the name of the part you want it on
Report Abuse
BuildAndRaceBuilders is not online. BuildAndRaceBuilders
Joined: 10 Dec 2012
Total Posts: 250
24 Jan 2015 11:18 PM
I think I might wanna marry you


thank u sooooo much =DDDDDDDDDD
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
24 Jan 2015 11:22 PM
can I have a gold ring?
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