|
| 06 Aug 2012 12:30 PM |
When I put this Script in my screen GUI button it doesnt save. It is supposed to Save the Levels Completed. I need fixing on the Load one to but I dont want to post two because it will be too long. Hope someone can fix it thanks!
function SaveScore(plyr, score) plyr:SaveNumber("Levels Completed", score) --Change KO's to whatever your leaderstats is. Like "Money" or something. end
function onClicked()
player = script.Parent.Parent.Parent.Parent.Parent player:WaitForDataReady() if player.DataReady == true then SaveScore(player, player.leaderstats:findFirstChild(script.Parent.Parent.Parent.Configuration.Type.Value).Value) m = Instance.new("Message",player.PlayerGui) m.Text = script.Parent.Parent.Parent.Configuration.Type.Value.. " Saved" -- Let's them know the stats are saved. game:service("Debris"):AddItem(m, 3) else m = Instance.new("Message",player.PlayerGui) m.Text = "Waiting untill DataReady..." game:service("Debris"):AddItem(m, 3)
end end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 06 Aug 2012 12:48 PM |
| Post output, Check script type, Also, if it is in a GUI then script.Parent.MouseButton1Click Might not work but that all depends on the parent so check that too. |
|
|
| Report Abuse |
|
| |