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: Error on line 4?

Previous Thread :: Next Thread 
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 02:49 PM
while true do
repeat wait() until a+b+c+d+e+f+g+h+i+j+k == game.Players.NumPlayers
print("So it does work")
if a+b+c+d+e+f+g+h+i+j+k == game.Players.NumPlayers then
game.StarterGui.LocalScript.Disabled = false
wait(120)
game.StarterGui.LocalScript.Disabled = true
game.Workspace.Tally1.Value = 0
game.Workspace.Tally2.Value = 0
game.Workspace.Tally3.Value = 0
game.Workspace.Tally4.Value = 0
game.Workspace.Tally5.Value = 0
game.Workspace.Tally6.Value = 0
game.Workspace.Tally7.Value = 0
game.Workspace.Tally8.Value = 0
game.Workspace.Tally9.Value = 0
game.Workspace.Tally10.Value = 0
game.Workspace.Tally11.Value = 0
end
end
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 02:51 PM
a+b+c+d+e+f+g+h+i+j+k

Ok, what?
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 02:53 PM
DUH. I forgot to set the subnames of them the tallies.
Still open incase it still doesn't work xD
Thanks for pointing that out. :P
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 02:57 PM
--This is put in a Script(Classname) and is in workspace so tell me if I put it in the wrong place or in the wrong script classname.
local a=game.Workspace.Tally1.Value
local b=game.Workspace.Tally2.Value
local c=game.Workspace.Tally3.Value
local d=game.Workspace.Tally4.Value
local e=game.Workspace.Tally5.Value
local f=game.Workspace.Tally6.Value
local g=game.Workspace.Tally7.Value
local h=game.Workspace.Tally8.Value
local i=game.Workspace.Tally9.Value
local j=game.Workspace.Tally10.Value
local k=game.Workspace.Tally11.Value
while true do
repeat wait() until a+b+c+d+e+f+g+h+i+j+k == game.Players.NumPlayers
print("So it does work")
if a+b+c+d+e+f+g+h+i+j+k == game.Players.NumPlayers then
game.StarterGui.LocalScript.Disabled = false
wait(120)
game.StarterGui.LocalScript.Disabled = true
game.Workspace.Tally1.Value = 0
game.Workspace.Tally2.Value = 0
game.Workspace.Tally3.Value = 0
game.Workspace.Tally4.Value = 0
game.Workspace.Tally5.Value = 0
game.Workspace.Tally6.Value = 0
game.Workspace.Tally7.Value = 0
game.Workspace.Tally8.Value = 0
game.Workspace.Tally9.Value = 0
game.Workspace.Tally10.Value = 0
game.Workspace.Tally11.Value = 0
end
end
--Still not working...
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 02:58 PM
Variables do not work like that.

You have to let the variables be the object, then access the property:

IE:
a = Tally1
b = Tally2
c = Tally3
...

a.Value+b.Value+c.Value+...
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:14 PM
--Localscript,StarterGui
local a=game.Workspace.Tally1
local b=game.Workspace.Tally2
local c=game.Workspace.Tally3
local d=game.Workspace.Tally4
local e=game.Workspace.Tally5
local f=game.Workspace.Tally6
local g=game.Workspace.Tally7
local h=game.Workspace.Tally8
local i=game.Workspace.Tally9
local j=game.Workspace.Tally10
local k=game.Workspace.Tally11
if
a.Value > b.Value or a.Value > c.Value or a.Value > d.Value or a.Value > e.Value or a.Value > f.Value or a.Value > g.Value or a.Value > h.Value or a.Value > i.Value or a.Value > j.Value or a.Value > k.Value then --See what tally wins
game.Workspace.Sound.LocalScript.Disabled = false
print("It worked!")
wait(120)
game.Workspace.Sound.LocalScript.Disabled = true
end
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:19 PM
^ It's working if you guys were wondering....
bump
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:20 PM
"It's working if you guys were wondering...."

Soo..... What?
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:21 PM
I can't seem to find why.
It's on a localscript and in startergui and the other script looks the for localscript in startergui is that the problem or something else it doesn't even print what I put.
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:22 PM
It's not* xD wow I type too fast for me to keep up...
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:22 PM
Oh, it isn't working, I see.

Also, the reason is LocalScripts DO NOT WORK IN WORKSPACE. They ONLY WORK IN PLAYERS AND CHARACTERS.
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:24 PM
The localscript is in StarterGui and my main script. (the one I posted to start this forum) Is a normal script in workspace. So what's up with it I have no guesses and I never see the prints I placed in the script.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:25 PM
"game.Workspace.Sound.LocalScript"

Also, you will never need to modify StarterGui until you know more about it.
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:32 PM
Now it only works if a player resets... How do I fix that? make the localscript in StarterGui a normal script?
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:37 PM
Bump?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:37 PM
Like I said:

Until you know more about StarterGui, DO NOT MODIFY IT.
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
21 Jun 2014 03:40 PM
How's he supposed to learn more about StarterGui without modifying it?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:42 PM
By working out what it does first.

If you want to modify a Player's GUI, modify Player.PlayerGui

StarterGui is JUST for storing a ScreenGui to be inserted into new Players.
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:45 PM
I know that -_- before I was a beginner scripter(I still am) I was a builder....and I made guis and looked at them ect. I'm not as stupid as you think I am.... Not trying to sound mean.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:46 PM
Its a common mistake, modifying StarterGui when attempting to modify a Players GUI.
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:51 PM
Now does it do the same is backpack as it does in StarterGui?...
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:52 PM
in*
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:54 PM
A script in StarterGui will not run, as StarterGui is just like StarterPack (I think that is its name, anyway. The place you put tools in for them to be in a Player's Backpack when they spawn)

Run it in the Player's PlayerGui: The Backpack of GUIs.
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
21 Jun 2014 03:58 PM
Could you atleast show me a script to get the localscript into the Player without error?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jun 2014 03:59 PM
Use script.Parent, because this should be in the Gui :P
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