generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Script working in roblox studio but not online

Previous Thread :: Next Thread 
TherinCallis is not online. TherinCallis
Joined: 17 Apr 2013
Total Posts: 5
05 Jun 2013 01:43 PM
I am trying to script a leaderboard that has two stats, one Dollars and one Bank. i was successful in making said leaderboard. I made a second script inside the leaderboard script that would add money to the Dollars stat every half a minute. i tested the script in roblox studio and it worked perfectly, but when i uploaded it to this account's place, instead of the place it was meant for on my alt account, it did not work. Why is that?

here is the add money script i used. can you tell me what is missing to make it work online?

while wait(30) do
game.Players.LocalPlayer.leaderstats["Dollars"].Value=game.Players.LocalPlayer.leaderstats["Dollars"].Value+150
end
Report Abuse
monster07 is not online. monster07
Joined: 19 Jul 2009
Total Posts: 533
05 Jun 2013 01:45 PM
When u copy games over make sure to save as then open in your new place and not to select everything and save selection to Roblox or make it a model. If you do this is wont work.
Report Abuse
TherinCallis is not online. TherinCallis
Joined: 17 Apr 2013
Total Posts: 5
05 Jun 2013 01:47 PM
im not copying my game over. on this account i have an empty baseplate with some random bricks i also used for testing. i scripted it on this place in roblox studio as well
Report Abuse
TherinCallis is not online. TherinCallis
Joined: 17 Apr 2013
Total Posts: 5
05 Jun 2013 02:12 PM
anyone know?
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
05 Jun 2013 02:15 PM
1) scripts will work the same on ANY account the same way..

my guess is that you probably have something wrong with the leaderboard on the place or have a different leaderboard[updated?] on your other account.
Report Abuse
fatajordan is not online. fatajordan
Joined: 24 Oct 2009
Total Posts: 45
05 Jun 2013 02:20 PM
its not on my other place. what i mean is when i test it in roblox studio, it works but after i upload it to roblox and play it on roblox, it doesnt
Report Abuse
fatajordan is not online. fatajordan
Joined: 24 Oct 2009
Total Posts: 45
05 Jun 2013 02:20 PM
this is my alt btw
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
05 Jun 2013 02:37 PM
your new leaderboard put in a script in workspace

game.Players.PlayerAdded:connect(function(player()
local stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"
local doll = Instance.new("IntValue", stats)
doll.Name = Dollars
doll.Value = 0
local bank = Instance.new("IntValue", stats)
bank.Name = Bank
bank.Value = 0
local A = script.MONEYSCRIPT:clone()
A.Parent = player
A.Disable = false
end)

------------------------------------------------------------------------------------
your new money script put inside a script inside the leaderboard and disable it

while true do
lol = script.Parent:findFirstChild("leaderstats")
if lol ~= nil then
lol.Dollars.Value = lol.Dollars.Value + 150
wait(30)
end
end
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
05 Jun 2013 02:39 PM
LocalPlayer only works in LocalScripts, only working in the Player.
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
05 Jun 2013 02:40 PM
@above thats what i thought but i dont know much about localplayer so i didnt say anything :3
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image