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 » Scripters
Home Search
 

Re: Custom Disaster Script

Previous Thread :: Next Thread 
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 11:43 AM
local DisasterFolder = game.ServerStorage.Maps
local timeLasted = 60
local timeBetween = 90
while wait() do
local Disasters = DisasterFolder:GetChildren()
if #Disasters == 0 then
script:remove()
return
end
local DisasterChosen = Disasters[math.random(1,#Disasters)]
local DisasterChosenClone = DisasterChosen:Clone()
DisasterChosenClone.Parent = game.Workspace
DisasterChosenClone:MakeJoints()
for i, v in pairs(game.Players:GetChildren()) do
v:LoadCharacter()
end
local msg = Instance.new('Hint',game.Workspace)
msg.Text = 'This rounds disaster: '..DisasterChosenClone.Name..'!'
wait(timeLasted)
DisasterChosenClone:Destroy()
msg.Text = 'Choosing/waiting for disaster...'
wait(timeBetween)
end

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
DSiAddict is not online. DSiAddict
Joined: 11 Apr 2015
Total Posts: 316
26 Apr 2015 11:45 AM
Hints don't work with the new Topbar UI.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 11:52 AM
script custom gui?

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 12:41 PM
i now have:

local DisasterFolder = game.ServerStorage.Disasters
local timeLasted = 10
local timeBetween = 10
local msg = Instance.new('Message',game.Workspace)
while wait() do
msg.Text = 'You have '..timeBetween..' seconds to build!'
wait(3)
msg:Destroy()
wait(timeBetween-3)
local Disasters = DisasterFolder:GetChildren()
if #Disasters == 0 then
script:remove()
return
end
local DisasterChosen = Disasters[math.random(1,#Disasters)]
local DisasterChosenClone = DisasterChosen:Clone()
DisasterChosenClone.Parent = game.Workspace
DisasterChosenClone:MakeJoints()
msg.Text = 'This rounds catastrophe: '..DisasterChosenClone.Name
wait(3)
msg:Destroy()
wait(timeLasted-3)
DisasterChosenClone:Destroy()
end

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 12:47 PM
b

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 12:53 PM
bnmbnmbnm

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
26 Apr 2015 12:54 PM
Hints work fine, you don't know what you're talking about.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 12:55 PM
idc im gonna make a custom gui anyways
anyways, why isnt it working?

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
26 Apr 2015 01:06 PM
--Store all disasters in lighting in a model called "Disasters"
--I think i forgot an end or two.

timeToBuild = 10
timeDisastersLast = 10
hint = Instance.new("Hint",game.Workspace)
disasterPack = game.Lighting:findFirstChild("Disasters")

while true do
wait()
hint.Text = "Starting round..."
for i = timeToBuild,0,-1 do
hint.Text = "You have "..i.." seconds left to build!"
wait(1)
end
hint.Text = "Choosing disaster..."
local picked = disasterPack[math.random(1,#disasterPack:GetChildren())] --Not sure if it should be 0 or 1
if picked ~= nil then
local clonePicked = picked:clone()
clonePicked.Parent = game.Workspace
clonePicked:MakeJoints()
hint.Text = "Disaster Chosen: "..clonePicked.Name
else
print("Disaster is nil!")
hint.Text = "An unexpected error has occurred!"
end
for i = timeDisastersLast,0,-1 do
hint.Text = i.." seconds till the disaster is over!"
wait(1)
end
clonePicked:Destroy()
end
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 01:11 PM
doesnt work
again i need mine to be f1xed

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
26 Apr 2015 01:12 PM
Any errors?
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 01:13 PM
no
can some1 PLEASE fix mine?

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
26 Apr 2015 01:14 PM
Well, where does it stop working? Put some prints in there and see where it stops printing.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 01:17 PM
it works, but the first hint only works 1 time
AND its the only 1 to work at all

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
26 Apr 2015 01:19 PM
local DisasterFolder = game.ServerStorage.Disasters
local timeLasted = 10
local timeBetween = 10
local msg = Instance.new('Message',game.Workspace)

while wait() do
msg.Text = 'You have '..timeBetween..' seconds to build!'
wait(3)
msg.Parent = nil
wait(timeBetween-3)
local Disasters = DisasterFolder:GetChildren()
if #Disasters == 0 then
script:Destroy()
return
end
local DisasterChosen = Disasters[math.random(1,#Disasters)]
local DisasterChosenClone = DisasterChosen:Clone()
DisasterChosenClone.Parent = game.Workspace
DisasterChosenClone:MakeJoints()
msg.Parent = game.Workspace
msg.Text = 'This rounds catastrophe: '..DisasterChosenClone.Name
wait(3)
msg.Parent = nil
wait(timeLasted-3)
DisasterChosenClone:Destroy()
end
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
26 Apr 2015 01:20 PM
You created only 1 instance of "msg" and then destroyed it after using it once.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 01:21 PM
ok now it all works, except 1 thing:
1st hint runs 1 time

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
26 Apr 2015 01:22 PM
add

msg.Parent = game.Workspace

before the first hint
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
26 Apr 2015 01:24 PM
yayz

God grant me the wisdom to not punch stupid ppl, for I know I will go to prison.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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