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: Is there any way to improve this or fix it?

Previous Thread :: Next Thread 
buzzshockey is not online. buzzshockey
Joined: 05 Jul 2010
Total Posts: 4382
07 Apr 2012 10:53 PM
hint = Instance.new("Hint")
hint.Parent = Workspace
hint.Text = "Loading Game"
msg = Instance.new("Message")
msg.Parent = Workspace
msg.Text = ""
set = Workspace.Set

function clearBricks()
for i, v in pairs(Workspace:children()) do
if v.Name == "build" then
v:Remove()
end
end
end

function lockBricks()

set.Parent = game.Lighting
for i, v in pairs(Workspace:children()) do
if v.Name == "build" then
v.Locked = true
end
end
end

function thawZombies()
for i, v in pairs(Workspace:children()) do
if v.Name == "Zombie" then
for i2, v2 in pairs(v:children()) do
if v2:IsA("BasePart") then
v2.Anchored = false
end
end
end
end
end

function killZombies()
for i, v in pairs(Workspace:children()) do
if v.Name == "Zombie" then
v:BreakJoints()
end
end
end

function openDoors()
for i = 1, 140 do
Workspace.Door.CFrame = Workspace.Door.CFrame + Vector3.new(0,.1,0)
Workspace.Door2.CFrame = Workspace.Door2.CFrame + Vector3.new(0,.1,0)
wait()
end
end

function closeDoors()
for i = 1, 140 do
Workspace.Door.CFrame = Workspace.Door.CFrame - Vector3.new(0,.1,0)
Workspace.Door2.CFrame = Workspace.Door2.CFrame - Vector3.new(0,.1,0)
wait()
end
end

function round()
set.Parent = Workspace
set:MakeJoints()
msg.Text = ""
hint.Text = "New Round: Start Building!"
wait(5)
for i = 120, 1, -1 do
if i ~= 1 then
hint.Text = "Zombies Come In: "..i.." Seconds!"
else
hint.Text = "Zombies Come In: "..i.." Second!"
end
wait(1)
end
lockBricks()
hint.Text = "Zombies are here!"
openDoors()
thawZombies()
wait(5)
for i = 60, 1, -1 do
if i ~= 1 then
hint.Text = "Survive for "..i.." Seconds!"
else
hint.Text = "Survive for "..i.." Second!"
end
wait(1)
end
hint.Text = "Round is Over! Good job!"
killZombies()
closeDoors()
clearBricks()
hint.Text = "Round is Over! Good job!"
wait(4)
round()
end

round()
Report Abuse
flamorie is not online. flamorie
Joined: 04 Feb 2009
Total Posts: 8563
07 Apr 2012 10:54 PM
What's wrong with it?
Report Abuse
buzzshockey is not online. buzzshockey
Joined: 05 Jul 2010
Total Posts: 4382
07 Apr 2012 10:54 PM
This script been giving issues but i can't find the problem
Report Abuse
flamorie is not online. flamorie
Joined: 04 Feb 2009
Total Posts: 8563
07 Apr 2012 10:56 PM
Is it running at all?
If so where does it break?
What's the output?
Report Abuse
buzzshockey is not online. buzzshockey
Joined: 05 Jul 2010
Total Posts: 4382
07 Apr 2012 10:57 PM
The doors open but the zombies doesn't always come out just in some rounds and i can't fiquire out why
Report Abuse
flamorie is not online. flamorie
Joined: 04 Feb 2009
Total Posts: 8563
07 Apr 2012 11:03 PM
I don't see a problem. NPC's can be glitchy on this game. You may wanna make sure they can get to where they need to go without anything in the way.
Report Abuse
buzzshockey is not online. buzzshockey
Joined: 05 Jul 2010
Total Posts: 4382
07 Apr 2012 11:03 PM
Hmm ok thanks for the help
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