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: Long Hunger Games script

Previous Thread :: Next Thread 
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:06 PM
Spawns = game.Workspace.Arena.Pedistals:GetChildren()
plrs = game.Players:GetPlayers()
maps = game.Lighting.Maps:GetChildren()
function insertMap()
local selectedmap = math.random(1,#maps)
selectedmap.Name = "Arena"
selectedmap.Parent = Workspace
end
function tp(plrs)
for i = #plrs,#Spawns do
plrs[i]:MoveTo(Spawns[i])
end
end
function fade(gui)
for i = 0, 1, .01 do
gui.BackgroundTransparency = i
gui.TextTransparency = i
wait(.01)
end
end
function unfade(gui)
for i = 1, 0, .01 do
gui.BackgroundTransparency = i
gui.TextTransparency = i
wait(.01)
end
end
number = 1

if plrs >= 6 then
script.Parent.Text = "Welcome to the hunger games!"
wait(5)
fade(script.Parent)
script.Parent.Text = "Reaping tributes..."
unfade(script.Parent)
wait(5)
fade(script.Parent)
script.Parent.Text = "Tributes reaped! Beggining games..."
tp(plrs)
insertMap()
end
-- Doesn't TP plrs
-- This is in a GUI
-- If you want to look at the hierarchy look at "Building" in edit on my profile
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
05 Apr 2014 10:07 PM
your for loop sucks

i'm asian
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:09 PM
Whats wrong with it?
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
05 Apr 2014 10:10 PM
it would teleport a few players then finish

plus, that's not even how you use MoveTo

i'm asian
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:12 PM
How would I fix it?
It doesn't do anything..
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:13 PM
I really need this
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
05 Apr 2014 10:15 PM
for i,v in pairs(plrs) do
v.Character:MoveTo(Vector3.new(Spawns[i].Position.X,Spawns[i].Position.Y+2,Spawns[i].Position.Z))
end

i'm asian
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:36 PM
Is that the main problem?
Or the only one
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
05 Apr 2014 10:37 PM
I've spotted many problems in your script

i'm asian
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:38 PM
No errors
No output
what are they?
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:38 PM
Make sure you check in "Building" on my profile
That may result an error
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:51 PM
halp!
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
05 Apr 2014 10:52 PM
i dont know how im nubcaik D:
Report Abuse
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
05 Apr 2014 10:54 PM
me too i'm nub i no script i just started week ago im new teech me scripting teech me

i'm asian
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:55 PM
itsk


Forever
Cntkillme
please help


,; is the equivalent
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 10:56 PM
Jig
Never said u wer nubcaik
And u aren't
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Apr 2014 11:08 PM
Blade

I have fixed your script,if you need any more help,just ask

(what are Friends for,right?)

plrs = game.Players:GetPlayers()
maps = game.Lighting.Maps:GetChildren()
TimeTilGameEnd = 60--once game starts,how much time until it ends
TimeTilRestart = 10--after it ends,how long until it starts a new game

function insertMap()
local selectedmap = maps[math.random(1,#maps)]
selectedmap.Name = "Arena"
selectedmap.Parent = Workspace
Spawns = selectedmap.Pedistals
end

function tp(plrs)
for i,v in pairs(plrs) do
Spawn = Spawns["Spawn"..i].Part
v.Character:MoveTo(Vector3.new(Spawn.Position.X,Spawn.Position.Y+2,Spawn.Position.Z))
end
end

function fade(gui)
for i = 0, 1, 0.01 do
gui.BackgroundTransparency = i
gui.TextTransparency = i
wait()
end
end

function unfade(gui)
for i = 1, 0, 0.01 do
gui.BackgroundTransparency = i
gui.TextTransparency = i
wait()
end
end

number = 1
Plrs = game.Players.NumPlayers

while wait() do
if Plrs >=1 then
for i,v in pairs(game.Players:GetPlayers()) do
ypcall(function()
ann = v.PlayerGui.ScreenGui.Frame.Announcement
ann.Text = "Welcome to the hunger games!"
wait()
fade(ann)
ann.Text = "Reaping tributes..."
unfade(ann)
wait()
fade(ann)
ann.Text = "Tributes reaped! Beggining games..."
insertMap()
tp(game.Players:GetChildren())
wait(TimeTilGameEnd)
Workspace.Arena:Destroy()
wait(TimeTilRestart)
end)
end
end
end
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Apr 2014 11:20 PM
oop,change this line..

if Plrs >=1 then
to
if Plrs >=6 then

srry,just needed to go fast
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 11:44 PM
island
You messed up
Follow me
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
05 Apr 2014 11:45 PM
actually
just play "Building"
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
06 Apr 2014 09:04 AM
Anybody see whats wrong in island's script?
go to "Building" on my profile in play and edit
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
06 Apr 2014 09:45 AM
Doesn't insert the map 2 times
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
06 Apr 2014 11:02 AM
-- Made a few adjustments to make it more realistic
tributesVAL = #tributes
tributes = plrs
plrs = game.Players:GetPlayers()
maps = game.Lighting.Maps:GetChildren()
TimeTilGameEnd = false--once game starts,how much time until it ends
TimeTilRestart = true--after it ends,how long until it starts a new game
timer = script.Parent.Parent.Time
timeout = false
if not timer.Value == 0 then
timeout = false
else
timeout = true
end

function setTimer()
timer.Value = 300
end

function goTimer()
repeat
wait(1)
timer.Value = timer.Value - 1
until timer.Value == 0
end

function insertMap()
local selectedmap = maps[math.random(1,#maps)]
clone = selectedmap:clone()
clone.Name = "Arena"
clone.Parent = Workspace
Spawns = clone.Pedistals
end

function tp(plrs)
for i,v in pairs(plrs) do
Spawn = Spawns["Spawn"..i].Part
v.Character:MoveTo(Vector3.new(Spawn.Position.X,Spawn.Position.Y+2,Spawn.Position.Z))
end
end

function fade(gui)
for i = 0, 1, 0.01 do
gui.BackgroundTransparency = i
gui.TextTransparency = i
wait()
end
end

function countdown()
countdownGUI = v.PlayerGui.ScreenGui.Frame.countdown
for i = 60, 2, -1 do
countdownGUI.Text = i
Workspace.Boom:play()
wait(1)
end
countdownGUI.Text = "1"
for i = 1,#plrs do
if plrs[i].Torso.Position.X > Torso.Position.X and countdownGUI.Value.Value > 0 then
plrs[i]:GetChildren(v)
if v:IsA("BasePart") then
v:destroy() -- hurried here
else
print("All is well")
end
end
end

function unfade(gui)
for i = 1, 0, 0.01 do
gui.BackgroundTransparency = i
gui.TextTransparency = i
wait()
end
end

function ChecknumTributes()
for i = 1, #tributes do
if tributes[i].Character.Humanoid.Health == 0 then
tributesVAL = tributesVAL - 1
game.Workspace.Cannon:play()
end
end
end

while wait() do
if Plrs >=2 then
for i,v in pairs(game.Players:GetPlayers()) do
ypcall(function()
ann = v.PlayerGui.ScreenGui.Frame.Announcement
ann.Text = "Welcome to the hunger games!"
wait()
fade(ann)
ann.Text = "Reaping tributes..."
unfade(ann)
wait()
fade(ann)
wait(2)
unfade(ann)
ann.Text = "Tributes reaped! Beggining games..."
fade(ann)
insertMap()
wait(5)
tp(game.Players:GetChildren())
countdown()
setTimer()
goTimer()
while true do
wait(5)
ChecknumTributes()
end
if #tributes == 1 then
ann.Text = "We have our victor! The victor is: "..tributes[1].Name
end
if timeout == true then
ann.Text = "There was no victor, Time ran out"
for i = 1, #tributes do
tributes[i].Character.Humanoid.Health = 0
end
end
Workspace.Arena:Destroy()
wait(10)
script.Disabled = true
wait(1)
script.Disabled = false
end)
end
end
end
end
--Broken
--No errors underlined
--No output
--Must be correct in syntax, therefore
--What did I do wrong?
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
06 Apr 2014 11:27 AM
Help my azz
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Apr 2014 11:55 AM
tributesVAL = #tributes
tributes = plrs


should be

tributes = plrs
tributesVAL = #tributes

you didn't define tributes..until after..
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