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: Why it dosen't work?

Previous Thread :: Next Thread 
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 11:42 AM
I made a credit buying script on a surfacegui with a textbutton but when i click it, nothing happens, the id is correct and no errors on the output is on a localscript.

local ID = 25782764
local player = game.Players.LocalPlayer


function onClick()
Game:GetService("MarketplaceService"):PromptPurchase(player, ID)
end

script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
22 Aug 2015 11:43 AM
You have to click the button...
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 11:44 AM
I'm clicking it, but nothing happens...
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
22 Aug 2015 11:46 AM
... You need www.roblox.com/assetID?. or something like that

Private Road - Residents Only
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
22 Aug 2015 11:46 AM
Alright, I'll be more specific:
1. Get a mouse
2. Move your cursor over the button
3. Bang left mouse button against face repeatedly until something happens
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 11:47 AM
What u mean? It works on a screengui but not on a surfacegui.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 11:51 AM
Bump
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
22 Aug 2015 11:52 AM
Don't you think that was something you should have mentioned? LocalScripts don't even run in the workspace.

Put the ScreenGui in the StarterGui, then set its Adornee property to the brick in workspace, then the localscript will run inside of it.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 11:53 AM
But i want it to RUN on a surfacegui NOT on a screengui...
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 11:59 AM
Bump
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
22 Aug 2015 12:01 PM
I just explained what you have to do if you want to use a SurfaceGui.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:02 PM
Ok, thanks.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:11 PM
I can't find Adornee... Where it is located?
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:14 PM
Bump
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
22 Aug 2015 12:15 PM
http://wiki.roblox.com/index.php?title=API:Class/BillboardGui/Adornee


"Correct me if I'm wrong, but I'm normally right." -eLunate
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:17 PM
Omg anybody could help me on that script? Is urgent.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:19 PM
nvm hahaha i'm sorry.
Report Abuse
iWindowz is not online. iWindowz
Joined: 05 Jan 2013
Total Posts: 1809
22 Aug 2015 12:20 PM
If this script is in a button and it's not in a frame, there would be 2 parents.
So the script would look like this..

script.Parent.Parent.Adornee = game.Workspace.PartNameHere -- has to be unique name.
local ID = 25782764
local player = game.Players.LocalPlayer


function onClick()
Game:GetService("MarketplaceService"):PromptPurchase(player, ID)
end

script.Parent.MouseButton1Click:connect(onClick)

Script has to be located in StarterGui.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:30 PM
Dosen't work.
Placed a localscript on the surfaceGui, but dosen't work.
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 12:36 PM
Please guis explain well and don't make me crazy. Do i need to put it on the startergui or on the part of the surfacegui?
Report Abuse
rubene45 is not online. rubene45
Joined: 08 May 2012
Total Posts: 333
22 Aug 2015 02:53 PM
Bump, come on is urgent.
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