|
| 11 Feb 2012 10:35 AM |
I can't get this script to work in my place that saves a stat and updates the value of that stat in a gui.....The real problem is, I can't go in test mode because the test mode Player's DataReady is always false and even roblox's error monitoring script won't work!!!! I put my name in the admin string value but it doesn't come up ingame! There's no way for me to check errors and everything I try won't work and it's driving me crazy!!!!!!!!!!!!!!!!!!!!!
This get's put in the player:
player = script.Parent player:WaitForDataReady() while true do wait() player:SaveNumber("PPoints", player.PlayerOnlyPoints.Value) if player["PlayerOnlyPoints"].Value > 49999 then local badge = game:GetService("BadgeService") badge:AwardBadge(player.userId, 72073502) end wait() end
This is the leaderboard:
function Entered(p) p:WaitForDataReady()
stats = Instance.new("IntValue") stats.Parent = p stats.Name = "leaderstats" local vip = Instance.new("BoolValue") vip.Parent = p vip.Name = "Vip_Claimed" vip.Value = false local PlayerOnlyPoints = Instance.new("IntValue", p) if p:LoadNumber("PPoints") ~= nil or p:LoadNumber("PPoints") ~= 0 then PlayerOnlyPoints.Value = p:LoadNumber("PPoints") else PlayerOnlyPoints.Value = 0 end PlayerOnlyPoints.Name = "PlayerOnlyPoints" money = Instance.new("IntValue") money.Value = 0 money.Name = "Points" money.Parent = stats
end
game.Players.PlayerAdded:connect(Entered)
And this is SUPPOSED to update the amount of points in the gui.
player = script.Parent.Parent.Parent.Parent player:WaitForDataReady() while true do script.Parent.num.Text = ToString(player.PlayerOnlyPoints.Value) wait() end
Sorry if it's really long but this is just really annoying me and I don't know what to do... |
|
|
| Report Abuse |
|
|
cart6157
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 2194 |
|
|
| 11 Feb 2012 10:44 AM |
| I'm pretty sure there isn't a badge with and ID over 72 million. My phone recognizes the number as a fonenumber. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 10:45 AM |
| I copied it from the IntValue of the badge model....I'll check it again.... |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 10:49 AM |
| Copied directly from the BadgeId IntValue: 72073502 |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 10:50 AM |
| Besides, that wouldn't explain why even roblox's error monitoring script won't work. |
|
|
| Report Abuse |
|
|
cart6157
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 2194 |
|
|
| 11 Feb 2012 10:53 AM |
| Maybe because you can't use the awardbadge method in test mode. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 10:55 AM |
| I wasn't trying to use it in test mode....It wont work in the game in normal play mode! Not even the roblox error monitoring script will work in-game! |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 11:54 AM |
| If you made the badge, then you have the badge, so you can't give yourself another. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 04:04 PM |
It's not the badge that wont work, It's saving and loading the PlayerOnlyPoints.
Death to free models. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 04:18 PM |
I fixed it....I don't think that DataPersistance can run in a while true do loop.... I still don't know why the error script wouldn't work.....oh well...
Death to free models. |
|
|
| Report Abuse |
|
|
DXPower
|
  |
| Joined: 21 Oct 2008 |
| Total Posts: 2866 |
|
|
| 11 Feb 2012 04:24 PM |
| I don't know why Server Error Monitoring wont work either, they should fix it soon. ._. |
|
|
| Report Abuse |
|
|