pikminix
|
  |
| Joined: 10 Jul 2009 |
| Total Posts: 57 |
|
|
| 05 Aug 2014 10:25 PM |
Ive been trying to get my own Cash GUI script working along with a coin that is supposed to give you 1 cash whenever you click on it. It is not a leaderboard, its a GUI. Ive been trying for the past 9 hours straight to get it to work and study about it but i just cant get it! Here are my scripts so far:
Explorer StarterGUI: >StarterGUI >UI --is a ScreenGui >Rings --is a Frame >TextLabel >RingsValue --is a NumberValue >Script --SCRIPT BELOW
Script: rings = script.Parent txt = script.Parent.Parent txt.Text = rings.Value
function onRingsAdded() txt.Text=rings.Value end
rings.Value.Changed:connect(onRingsAdded)
And as for the button that is supposed to give you 1 ring when you click on it... >Workspace >Ring --a brick with mesh on it >ClickDetector >Mesh >Script --SCRIPT BELOW! >amnt --This is a NumberValue
And for the script inside the Ring:
function onClicked(part) local hum = part.Parent:FindFirstChild("Humanoid") game.Players[hum.Parent.Name].PlayerGui["UI"].Rings.TextLabel.RingsValue.Value = game.Players[hum.Parent.Name].PlayerGui["UI"].Rings.TextLabel.RingsValue.Value + amnt script.Parent.Transparency = 1 wait(4) script.Parent.Transparency = 0 end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--it should also dissapear for 4 seconds!
------------------end of script PLEASE MY FELLOW NOOBS CAN SOMEONE TELL ME WHAT I DID WRONG!? All help is very deeply appreciated!!!!!!
|
|
|
| Report Abuse |
|
|
pikminix
|
  |
| Joined: 10 Jul 2009 |
| Total Posts: 57 |
|
|
| 05 Aug 2014 10:27 PM |
| the explorer thing didnt come out right. the only part really messed up is that ClickDetector,Mesh,Script, & amnt are inside of the brick "Ring". |
|
|
| Report Abuse |
|
|
pikminix
|
  |
| Joined: 10 Jul 2009 |
| Total Posts: 57 |
|
|
| 05 Aug 2014 10:38 PM |
Explorer StarterGUI: >StarterGUI >>UI --is a ScreenGui >>>Rings --is a Frame >>>>TextLabel >>>>>RingsValue --is a NumberValue >>>>>>Script --SCRIPT ABOVE
Explorer Ring: >Workspace >>Ring --a brick with mesh on it >>>ClickDetector >>>Mesh >>>Script --SCRIPT BELOW! >amnt --This is a NumberValue
FIXED EXPLORERS, SORRY
|
|
|
| Report Abuse |
|
|
pikminix
|
  |
| Joined: 10 Jul 2009 |
| Total Posts: 57 |
|
| |
|