Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
|
| 27 Dec 2016 08:43 PM |
I need the player to click the item more than once, (as he does it the block gets smaller) and then get the added hunger.value once it reaches a small enough block or mesh
function onClick() local Amount = script.Parent.Amount local Hunger = game.Players.LocalPlayer.PlayerGui.HungerGUI.tray.Hunger Hunger.Value = Hunger.Value - Amount.Value script.Parent:remove() end
script.Parent.ClickDetector.MouseClick:connect(onClick)
|
|
|
| Report Abuse |
|
|
Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
| |
|
Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
| |
|
Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
| |
|
OAuth2
|
  |
| Joined: 27 Nov 2016 |
| Total Posts: 751 |
|
|
| 27 Dec 2016 09:04 PM |
Woah there, fella.
http://wiki.roblox.com/index.php?title=API:Class/ClickDetector/MouseClick http://wiki.roblox.com/index.php?title=API:Class/Script http://wiki.roblox.com/index.php?title=API:Class/LocalScript
|
|
|
| Report Abuse |
|
|
Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
|
| 27 Dec 2016 09:10 PM |
@oauth
just give me the code |
|
|
| Report Abuse |
|
|
Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
| |
|
|
| 27 Dec 2016 09:19 PM |
:remove is deprecated, use :Destroy()
|
|
|
| Report Abuse |
|
|
Zoanuv
|
  |
| Joined: 09 Apr 2016 |
| Total Posts: 118 |
|
|
| 27 Dec 2016 09:23 PM |
| give me the code i dont care about :remove |
|
|
| Report Abuse |
|
|