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: How do i make my script...

Previous Thread :: Next Thread 
LOBOT44 is not online. LOBOT44
Joined: 03 Feb 2010
Total Posts: 23539
17 Jul 2012 09:51 AM
check if the message says "1" and then plays a sound. but only for 1
Report Abuse
Zigar is not online. Zigar
Joined: 25 May 2008
Total Posts: 655
17 Jul 2012 09:58 AM
Heres the script :

check if dah message says 1
if true then make a sound
sound = the sound i want to play
end
end
end
end
end
end
end
end
Report Abuse
LOBOT44 is not online. LOBOT44
Joined: 03 Feb 2010
Total Posts: 23539
17 Jul 2012 10:03 AM
thanks
Report Abuse
UFAIL2 is online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
17 Jul 2012 10:08 AM
http://www.roblox.com/--item?id=62216859
Report Abuse
Joalmo is not online. Joalmo
Joined: 28 Jun 2009
Total Posts: 1160
17 Jul 2012 10:09 AM
this thread
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
17 Jul 2012 10:18 AM
played = false
msg = game.Workspace.Message
while played == false and msg.Text == "1" do
played = false
sound:Play()
wait(1)
end
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
17 Jul 2012 10:18 AM
First of all, we need to know what message. Second of all, we need to know when it will be changed to '1'.
Report Abuse
LOBOT44 is not online. LOBOT44
Joined: 03 Feb 2010
Total Posts: 23539
17 Jul 2012 10:22 AM
Heres the whole script


local message = Instance.new("Message")
message.Parent = game.Workspace
local maps = game.Lighting.Maps:children()
local disasters = game.Lighting.Disasters:children()
local animation = game.Lighting.Sounds:children()
local sound = game.Workspace.Tick

while true do
wait()
for i = 20, 10, -1 do
message.Text = "Intermission: " .. i
wait(1)
end

for s = 9, 0, -1 do
message.Text = "Intermission: " .. s
sound:play()
wait(0.1)
sound:stop()
wait(1)
--here i want to add a thing to check if the message == 1
end

message.Text = ""
local player = game.Players:GetPlayers()

for x = 1, #player do
player[x].Character.Torso.CFrame = CFrame.new(Vector3.new(8, 1, -31)) --Teleports to the map
end

local map = maps[math.random(1, #maps)]

if map then
map = map:clone()
map.Parent = game.Workspace
map:makeJoints()
message.Text = "Map has been chosen: " .. map.Name
wait(2)
end

for t = 50, 0, -1 do
message.Text = "You have " .. t .. "to build!"
wait(1)
end

message.Text = ""

local disaster = disasters[math.random(1, #disasters)]

if disaster then
disaster = disaster:clone()
disaster.Parent = game.Workspace
disaster:makeJoints()
message.Text = "Disaster is: " .. disaster.Name
wait(2)
end
message.Text = ""

wait(1)

local hint = Instance.new("Hint")
hint.Parent = game.Workspace

for h = 50, 5, -1 do
hint.Text = "" .. h .. " Left"
wait(1)
end

hint.Text = ""

for x = 1, #player do
player[x].Character.Torso.CFrame = CFrame.new(Vector3.new(12, 1, -17)) --Teleports back to the lobby
end

if disaster then
disaster:remove()
end

if map then
map:remove()
end

message.Text = ""
disaster:remove()

end
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
17 Jul 2012 10:28 AM
for s = 9, 0, -1 do
message.Text = "Intermission: " .. s
if s == 1 then
sound:Play()
wait(1)
sound:Stop()
elseif s ~= 1 then
sound:play()
wait(0.1)
sound:stop()
wait(1)
end
end
:LLL
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