|
| 29 Dec 2013 05:02 PM |
plz take the time to read all of this,i don't know where the problem is..its supposed to.. teleport "player" to the lobby,player = Game.Players.LocalPlayer btw,first off,it doesn't work at all in online mode,in studio mode,SOME of the script works.. anyhow,after doing that,it is supposed to display a message,counting down(works) and after its done,it kills all the players,and changes their teams randomly,problem is,it doesn't change team or kill!help?: heres the code..i know..its long..
target = CFrame.new(0, 184, 0) player = game.Players.LocalPlayer player.Character.Torso.CFrame = target player.TeamColor = BrickColor.new("Really black") wait(3) b = 0 c = 0 wait(3) m = Instance.new("Message",Workspace) m.Text = "Starting game in 10 seconds,picking teams" wait(2) m:remove() m = Instance.new("Message",Workspace) a = 9 while wait(1) do if a > 0 then a = a-1 m.Text = (a) else m:remove() if c == 0 then c = c+1 z = Instance.new("IntValue",player) z.Name = "z" z.Value = math.random(1,2) if b == 0 then b = b+1 if player.z.Value == 1 then player.TeamColor = BrickColor.new("Really red") player.Character.Head:remove() wait(5) m = Instance.new("Message",Workspace) if Workspace.bkos.Value > 0 then m.Text = "Blue Team Gets The Advantage" wait(1) m:remove() else m.Text = "Red Team Gets The Advantage" wait(1) m:remove() end end elseif player.z.Value == 2 then player.TeamColor = BrickColor.new("Really blue") player.Character.Head:remove() wait(5) m = Instance.new("Message",Workspace) if Workspace.bkos.Value > 0 then m.Text = "Blue Team Gets The Advantage" wait(1) m:remove() else m.Text = "Red Team Gets The Advantage" wait(1) m:remove() end end end end end
|
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:05 PM |
| Is it a localscript? And I don't even want to try to debug that...IT would be helpful if you named variables something related to what they are... |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:07 PM |
b and c are kinda like debouncers.. z is an intvalue that's supposed to parent to the player..nothing underneath this works..:
target = CFrame.new(0, 184, 0) player = game.Players.LocalPlayer player.Character.Torso.CFrame = target player.TeamColor = BrickColor.new("Really black") wait(3) b = 0 c = 0 wait(3) m = Instance.new("Message",Workspace) m.Text = "Starting game in 10 seconds,picking teams" wait(2) m:remove() m = Instance.new("Message",Workspace) a = 9 while wait(1) do if a > 0 then a = a-1 m.Text = (a) else m:remove() the above works,but not the rest of the script.. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:08 PM |
| and no,its not in a localscript |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:09 PM |
| It must beh localscript to work online. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:09 PM |
| Needs to be a local script to get Players.LocalPlayer |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 29 Dec 2013 05:10 PM |
| Even if you get that to work, you're are going to have so many problems with it. Not trying to scrutinize, just saving you the headache. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:11 PM |
but when its a local script it doesn't work in studio..and right now,the problem doesn't seem to be Game.Players.LocalPlayer(although that's probly why it wont work in online,but) problem is,(I can work out the rest later) why wont it kill the players,or change the teams?? |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:12 PM |
| @ Azarth,belive me,ive been "headaching",if u will,for days over this,and its almost done!:D just need to fix the last part of the script.. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:12 PM |
| Unless this will be a studio only game, it doesn't matter really, just test in online mode and debug with robloxs Remote Error Monitoring script, |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:13 PM |
| ill have to search that up,but thx |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 05:24 PM |
| oh well,i guess ill never finish the game in my entire life or figure out what the problem is,oh well.. |
|
|
| Report Abuse |
|
|