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: ok..i know this is long,but i need help!

Previous Thread :: Next Thread 
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
29 Dec 2013 05:08 PM
and no,its not in a localscript
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
29 Dec 2013 05:09 PM
It must beh localscript to work online.
Report Abuse
DrRandomous is not online. DrRandomous
Joined: 25 Mar 2011
Total Posts: 1702
29 Dec 2013 05:09 PM
Needs to be a local script to get Players.LocalPlayer
Report Abuse
Azarth is not online. 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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
DrRandomous is not online. DrRandomous
Joined: 25 Mar 2011
Total Posts: 1702
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
29 Dec 2013 05:13 PM
ill have to search that up,but thx
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
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