Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:30 PM |
-- START OF CODE rap = plr.Data.RAP bux = plr.Data.ROBUX
script.Parent.MouseButton1Click:connect(function() bux.Value = bux.Value + rap.Value - 30% rap.Value = rap.Value - rap.Value end --END OF CODE
dont work
if i remove - 30% it does however
|
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:31 PM |
What do you want 30% of
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:35 PM |
i would like it so if the player sells their rap buy clicking this button it takes 30% from their rap so it would be like roblox's selling system
|
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:37 PM |
im guessing you want 30% of bux.Value + rap.Value and subtract that from bux.Value + rap.Value
didn't test but you can try this
rap = plr.Data.RAP bux = plr.Data.ROBUX
script.Parent.MouseButton1Click:connect(function() bux.Value = (bux.Value + rap.Value) - (0.30 x (bux.Value + rap.Value)) rap.Value = rap.Value - rap.Value -- im confused. rap.Value will always be 0? end
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:37 PM |
@hook, I posted that before noticing you replied to me, one moment
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:37 PM |
thanks for the help!
now i can continue to hopefully finish the save data
|
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:38 PM |
oh it worked?
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:38 PM |
idk i didnt try i said that then went to try but when i posted i saw that
|
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:40 PM |
btw if you want it to take 30% of rap its not that hard
rap.Value = rap.Value - (rap.Value x 0.30) -- sets rap.Value to rap.Value minus rap.Value times 0.30 (gets 30% of raps Value). easy math??
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:40 PM |
15:39:33.336 - Players.Player1.PlayerGui.Game.SellRap.Script:8: ')' expected (to close '(' at line 5) near
|
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:41 PM |
also instead of x you gotta use *
|
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:43 PM |
you forgot a ) at the end
-- old script i posted rap = plr.Data.RAP bux = plr.Data.ROBUX
script.Parent.MouseButton1Click:connect(function() bux.Value = (bux.Value + rap.Value) - (0.30 x (bux.Value + rap.Value)) rap.Value = rap.Value - rap.Value -- im confused. rap.Value will always be 0? end) -- you forgot the ) right next to the end in your original script and so did I lol.
-- new script Im posting because I think I did what you wanted wrong!
rap = plr.Data.RAP bux = plr.Data.ROBUX
script.Parent.MouseButton1Click:connect(function() bux.Value = bux.Value + rap.Value rap.Value = rap.Value - (0.30 x rap.Value) -- sets raps Value to 30% of raps original value - 30% of it end)
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:44 PM |
oh sorry, lol I dont use multiplication in roblox much
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:46 PM |
i changed it a bit but it works great!
#Code plr = script.Parent.Parent.Parent.Parent rap = plr.Data.RAP bux = plr.Data.ROBUX
script.Parent.MouseButton1Click:connect(function() bux.Value = bux.Value + (rap.Value * 0.30) -- sets rap.Value to rap.Value minus rap.Value times 0.30 (gets 30% of raps Value). easy math?? rap.Value = rap.Value - rap.Value end) #Code
while true do |
|
|
| Report Abuse |
|
|
Hookyto
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 80 |
|
|
| 31 May 2017 05:47 PM |
this is the game bty
https://www.roblox.com/catalog/844277221/redirect
while true do |
|
|
| Report Abuse |
|
|
|
| 31 May 2017 05:49 PM |
game is closed
#code print("oh no an errorz!") |
|
|
| Report Abuse |
|
|