EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 11:59 AM |
| So basically this script will countdown the time till the person gets paid. I've created a while loop to repeat it once it gets to 0. It just doesn't work. Here's my code formatted and the link is below the code. You get cash every 5 seconds which is just for testing purposes in another script that's working. 𝕞𝕠𝕟𝕖𝕪 = 𝕤𝕔𝕣𝕚𝕡𝕥.ℙ𝕒𝕣𝕖𝕟𝕥.ℙ𝕒𝕣𝕖𝕟𝕥.𝕍𝕒𝕝𝕦𝕖.𝕍𝕒𝕝𝕦𝕖 𝕒𝕞𝕠𝕦𝕟𝕥 = 𝕤𝕔𝕣𝕚𝕡𝕥.ℙ𝕒𝕣𝕖𝕟𝕥.ℙ𝕒𝕣𝕖𝕟𝕥.𝕒𝕞𝕠𝕦𝕟𝕥𝕋𝕠𝕎𝕒𝕚𝕥𝔽𝕠𝕣.𝕍𝕒𝕝𝕦𝕖 𝕥𝕚𝕞𝕖𝟚 = 𝕤𝕔𝕣𝕚𝕡𝕥.ℙ𝕒𝕣𝕖𝕟𝕥.ℙ𝕒𝕣𝕖𝕟𝕥.𝕥𝕚𝕞𝕖𝕋𝕠𝕎𝕒𝕚𝕥.𝕍𝕒𝕝𝕦𝕖 𝕤𝕥𝕠𝕡𝕚𝕗 = 𝟘 𝕨𝕙𝕚𝕝𝕖 𝕥𝕣𝕦𝕖 𝕕𝕠 𝕥𝕚𝕞𝕖𝟚 = ##### # # ################## = "$" .. 𝕒𝕞𝕠𝕦𝕟𝕥 .. " 𝕚𝕟 " .. 𝕥𝕚𝕞𝕖𝟚 𝕨𝕒𝕚𝕥(𝟙) 𝕨𝕙𝕚𝕝𝕖 𝕥𝕚𝕞𝕖𝟚 == 𝟘 𝕕𝕠 𝕥𝕚𝕞𝕖𝟚 = ##### # # ################## = "$" .. 𝕒𝕞𝕠𝕦𝕟𝕥 .. " 𝕚𝕟 " .. 𝕥𝕚𝕞𝕖𝟚 𝕨𝕒𝕚𝕥(𝟙) 𝕖𝕟𝕕 𝕖𝕟𝕕 https://www.roblox.com/games/863873292/city |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:00 PM |
money = script.Parent.Parent.Value.Value amount = script.Parent.Parent.amountToWaitFor.Value time2 = script.Parent.Parent.timeToWait.Value stopif = 0
while true do time2 = time2 - 1 script.Parent.Text = "$" .. amount .. " in " .. time2 wait(1) while time2 == 0 do time2 = time2 - 1 script.Parent.Text = "$" .. amount .. " in " .. time2 wait(1)
end end
|
|
|
| Report Abuse |
|
|
|
| 14 Jun 2017 12:03 PM |
for time = 10, 0, -1 do print(time) end print("paytime") |
|
|
| Report Abuse |
|
|
|
| 14 Jun 2017 12:04 PM |
for time = 10, 0, -1 do print(time) wait(1) end print("paytime") |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:12 PM |
Thank you. You literally save meh a33 each time |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:17 PM |
I've edited the script you gave me to this;
while true do for time = time2, 0, -1 do print(time) script.Parent.Text = "$" .. amount .. " in " .. time wait(1) end print("paytime") end
and now it's working. Thank you very much. |
|
|
| Report Abuse |
|
|
|
| 14 Jun 2017 12:23 PM |
also for time conversion
local t = 41280 print(("%.2d:%.2d:%.2d"):format(t/1440%12,t/60%60,t%60)) |
|
|
| Report Abuse |
|
|
|
| 14 Jun 2017 12:24 PM |
| good thing about %d is that it always rounds down so ya that all u need |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:51 PM |
| cheers, i got one more problem. i've created a script to check the groupID which #### ##### the player to access more money each time you get paid. i've used a local script for this and used the wiki website for part of the code. --------------------------------------- wait(1) cash = script.Parent.Value.Value game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer:IsInGroup(3166239) then print "Player is in the Roblox Fan club!" cash = 5 end end) |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:52 PM |
ᴡᴀɪᴛ(1) ᴄᴀꜱʜ = ꜱᴄʀɪᴘᴛ.ᴘᴀʀᴇɴᴛ.ᴠᴀʟᴜᴇ.ᴠᴀʟᴜᴇ
ɢᴀᴍᴇ.ᴘʟᴀʏᴇʀꜱ.ᴘʟᴀʏᴇʀᴀᴅᴅᴇᴅ:ᴄᴏɴɴᴇᴄᴛ(ꜰᴜɴᴄᴛɪᴏɴ(ɴᴇᴡᴘʟᴀʏᴇʀ) ɪꜰ ɴᴇᴡᴘʟᴀʏᴇʀ:ɪꜱɪɴɢʀᴏᴜᴘ(3166239) ᴛʜᴇɴ ᴘʀɪɴᴛ "ᴘʟᴀʏᴇʀ ɪꜱ ɪɴ ᴛʜᴇ ʀᴏʙʟᴏx ꜰᴀɴ ᴄʟᴜʙ!" ᴄᴀꜱʜ = 5 ᴇɴᴅ ᴇɴᴅ) |
|
|
| Report Abuse |
|
|
|
| 14 Jun 2017 12:52 PM |
| that should work just fine but needs your group id |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:53 PM |
𝓌𝒶𝒾𝓉(𝟣) 𝒸𝒶𝓈𝒽 = 𝓈𝒸𝓇𝒾𝓅𝓉.𝒫𝒶𝓇𝑒𝓃𝓉.𝒱𝒶𝓁𝓊𝑒.𝒱𝒶𝓁𝓊𝑒
𝑔𝒶𝓂𝑒.𝒫𝓁𝒶𝓎𝑒𝓇𝓈.𝒫𝓁𝒶𝓎𝑒𝓇𝒜𝒹𝒹𝑒𝒹:𝒸𝑜𝓃𝓃𝑒𝒸𝓉(𝒻𝓊𝓃𝒸𝓉𝒾𝑜𝓃(𝓃𝑒𝓌𝒫𝓁𝒶𝓎𝑒𝓇) 𝒾𝒻 𝓃𝑒𝓌𝒫𝓁𝒶𝓎𝑒𝓇:𝐼𝓈𝐼𝓃𝒢𝓇𝑜𝓊𝓅(𝟥𝟣𝟨𝟨𝟤𝟥𝟫) 𝓉𝒽𝑒𝓃 𝓅𝓇𝒾𝓃𝓉 "𝒫𝓁𝒶𝓎𝑒𝓇 𝒾𝓈 𝒾𝓃 𝓉𝒽𝑒 𝑅𝑜𝒷𝓁𝑜𝓍 𝐹𝒶𝓃 𝒸𝓁𝓊𝒷!" 𝒸𝒶𝓈𝒽 = 𝟧 𝑒𝓃𝒹 𝑒𝓃𝒹) |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 12:53 PM |
| i've tried it and put my groupID but the value doesn't change. shall i invite you to team create? |
|
|
| Report Abuse |
|
|
|
| 14 Jun 2017 12:55 PM |
the value doesnt change because you are probably storing the NUMBER instead of the VALUE OBJECT because when you store the number representing their value, its just a number however when you store the value itself and then set its value, you are using assignment to assign the Value property of the value
so instead of
local value = Item.Value value = 2 --only assigning the variable
local value = Item value.Value = 2 --assigning the Value property of the value |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 01:59 PM |
| im still having trouble understanding what to do, can i invite you to TC? |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 02:06 PM |
| i've done some trying and got this error 20:05:44.119 - Players.Player1.PlayerGui.Money.Frame.Script:7: bad argument ## ## ###### (string expected, got Object) this is the script inside it; cash = script.Parent.Value money = script.Parent.amountToWaitFor while true do wait(5) cash.Value = cash.Value + money.Value script.Parent.cashlabel.Text = cash wait() game.Workspace.playersMoney.Value = cash end |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 02:07 PM |
| ⁱ'ᵛᵉ ᵈᵒⁿᵉ ˢᵒᵐᵉ ᵗʳʸⁱⁿᵍ ᵃⁿᵈ ᵍᵒᵗ ᵗʰⁱˢ ᵉʳʳᵒʳ ²⁰:⁰⁵:⁴⁴.¹¹⁹ ⁻ ᴾˡᵃʸᵉʳˢ.ᴾˡᵃʸᵉʳ¹.ᴾˡᵃʸᵉʳᴳᵘⁱ.ᴹᵒⁿᵉʸ.ᶠʳᵃᵐᵉ.ˢᶜʳⁱᵖᵗ:⁷: ᵇᵃᵈ ᵃʳᵍᵘᵐᵉⁿᵗ ## ## ###### ⁽ˢᵗʳⁱⁿᵍ ᵉˣᵖᵉᶜᵗᵉᵈ, ᵍᵒᵗ ᴼᵇʲᵉᶜᵗ⁾ ᵗʰⁱˢ ⁱˢ ᵗʰᵉ ˢᶜʳⁱᵖᵗ ⁱⁿˢⁱᵈᵉ ⁱᵗ; ᶜᵃˢʰ ⁼ ˢᶜʳⁱᵖᵗ.ᴾᵃʳᵉⁿᵗ.ⱽᵃˡᵘᵉ ᵐᵒⁿᵉʸ ⁼ ˢᶜʳⁱᵖᵗ.ᴾᵃʳᵉⁿᵗ.ᵃᵐᵒᵘⁿᵗᵀᵒᵂᵃⁱᵗᶠᵒʳ ʷʰⁱˡᵉ ᵗʳᵘᵉ ᵈᵒ ʷᵃⁱᵗ⁽⁵⁾ ᶜᵃˢʰ.ⱽᵃˡᵘᵉ ⁼ ᶜᵃˢʰ.ⱽᵃˡᵘᵉ ⁺ ᵐᵒⁿᵉʸ.ⱽᵃˡᵘᵉ ˢᶜʳⁱᵖᵗ.ᴾᵃʳᵉⁿᵗ.ᶜᵃˢʰˡᵃᵇᵉˡ.ᵀᵉˣᵗ ⁼ ᶜᵃˢʰ ʷᵃⁱᵗ⁽⁾ ᵍᵃᵐᵉ.ᵂᵒʳᵏˢᵖᵃᶜᵉ.ᵖˡᵃʸᵉʳˢᴹᵒⁿᵉʸ.ⱽᵃˡᵘᵉ ⁼ ᶜᵃˢʰ ᵉⁿᵈ |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 02:08 PM |
| 𝓲'𝓿𝓮 𝓭𝓸𝓷𝓮 𝓼𝓸𝓶𝓮 𝓽𝓻𝔂𝓲𝓷𝓰 𝓪𝓷𝓭 𝓰𝓸𝓽 𝓽𝓱𝓲𝓼 𝓮𝓻𝓻𝓸𝓻 20:05:44.119 - 𝓟𝓵𝓪𝔂𝓮𝓻𝓼.𝓟𝓵𝓪𝔂𝓮𝓻1.𝓟𝓵𝓪𝔂𝓮𝓻𝓖𝓾𝓲.𝓜𝓸𝓷𝓮𝔂.𝓕𝓻𝓪𝓶𝓮.𝓢𝓬𝓻𝓲𝓹𝓽:7: 𝓫𝓪𝓭 𝓪𝓻𝓰𝓾𝓶𝓮𝓷𝓽 ## ## ###### (𝓼𝓽𝓻𝓲𝓷𝓰 𝓮𝔁𝓹𝓮𝓬𝓽𝓮𝓭, 𝓰𝓸𝓽 𝓞𝓫𝓳𝓮𝓬𝓽) 𝓽𝓱𝓲𝓼 𝓲𝓼 𝓽𝓱𝓮 𝓼𝓬𝓻𝓲𝓹𝓽 𝓲𝓷𝓼𝓲𝓭𝓮 𝓲𝓽; 𝓬𝓪𝓼𝓱 = 𝓼𝓬𝓻𝓲𝓹𝓽.𝓟𝓪𝓻𝓮𝓷𝓽.𝓥𝓪𝓵𝓾𝓮 𝓶𝓸𝓷𝓮𝔂 = 𝓼𝓬𝓻𝓲𝓹𝓽.𝓟𝓪𝓻𝓮𝓷𝓽.𝓪𝓶𝓸𝓾𝓷𝓽𝓣𝓸𝓦𝓪𝓲𝓽𝓕𝓸𝓻 𝔀𝓱𝓲𝓵𝓮 𝓽𝓻𝓾𝓮 𝓭𝓸 𝔀𝓪𝓲𝓽(5) 𝓬𝓪𝓼𝓱.𝓥𝓪𝓵𝓾𝓮 = 𝓬𝓪𝓼𝓱.𝓥𝓪𝓵𝓾𝓮 + 𝓶𝓸𝓷𝓮𝔂.𝓥𝓪𝓵𝓾𝓮 𝓼𝓬𝓻𝓲𝓹𝓽.𝓟𝓪𝓻𝓮𝓷𝓽.𝓬𝓪𝓼𝓱𝓵𝓪𝓫𝓮𝓵.𝓣𝓮𝔁𝓽 = 𝓬𝓪𝓼𝓱 𝔀𝓪𝓲𝓽() 𝓰𝓪𝓶𝓮.𝓦𝓸𝓻𝓴𝓼𝓹𝓪𝓬𝓮.𝓹𝓵𝓪𝔂𝓮𝓻𝓼𝓜𝓸𝓷𝓮𝔂.𝓥𝓪𝓵𝓾𝓮 = 𝓬𝓪𝓼𝓱 𝓮𝓷𝓭 |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 02:09 PM |
| ############################################ |
|
|
| Report Abuse |
|
|
EpicMessi
|
  |
| Joined: 11 Apr 2011 |
| Total Posts: 596 |
|
|
| 14 Jun 2017 02:09 PM |
| gyazo com / 5471c94bde1113f2fa401cecb2c8278c |
|
|
| Report Abuse |
|
|
| |
|
| |
|