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: Why won't my script work?!?! Help please!

Previous Thread :: Next Thread 
LordsLoss is not online. LordsLoss
Joined: 21 May 2011
Total Posts: 148
24 Sep 2015 05:34 PM
Okay, so my script works fine in testing mode. But doesn't work in actual gameplay. I have no idea why.



songs = {
"rbxassetid://206182947", -- Candy Candy [Megpoid Gumi 1/2]
--"rbxassetid://286531316", -- Candy Candy [Megpoid Gumi 2/2]
"rbxassetid://269793963", -- Izayoi Warabe Uta [Hatsuki Yura]
"rbxassetid://254537329", -- Let's Go to Heaven [Hatsune Miku 1/2]
--"rbxassetid://254538530", -- Let's Go to Heaven [Hatsune Miku 2/2]
"rbxassetid://240952271", -- Six Trillion Yeas and One Night [IA]
"rbxassetid://142283202", -- Guren no Yumiya [Linked Horizon] (Shingeki no Kyojin OP)
"rbxassetid://149596754", -- Ranbu no Melody [SID] (Bleach OP)
"rbxassetid://198905562", -- Uso [SID] (Fullmetal Alchemist)
"rbxassetid://154990237", -- Snow Fairy [FUNKIST] (Fairy Tail OP)
"rbxassetid://150801507", -- Monochrome no Kiss [SID] (Black Butler OP)
"rbxassetid://152945190", -- Black Bullet [fripSide] (Black Bullet)
"rbxassetid://188527278", -- My Soul, Your Beats [Lia] (Angel Beats OP)
"rbxassetid://201441937" -- Towa no Kizuna [Daisy x Daisy ft. Another Infinity] (Fairy Tail OP)
}

songs2 = {
"rbxassetid://286531316", -- Candy Candy [Megpoid Gumi 2/2]
"rbxassetid://254538530", -- Let's Go to Heaven [Hatsune Miku 2/2]
}

song = Instance.new("Sound", workspace)
while true do
song.SoundId = songs[math.random(1, #songs)]
song:Play()
wait(song.TimeLength)
song:Stop()
if song.SoundId == songs[1]
then
song.SoundId = songs2[1]
song:Play()
wait(song.TimeLength)
song:Stop()
elseif song.SoundId == songs[3]
then
song.SoundId = songs2[2]
song:Play()
wait(song.TimeLength)
song:Stop()
end
end
Report Abuse
IllegallyBlind is not online. IllegallyBlind
Joined: 07 Nov 2010
Total Posts: 1691
24 Sep 2015 05:56 PM
pls learn to debug your own code


Netflix and chill? I prefer Blockbuster and relax.
Report Abuse
SpIatooon is not online. SpIatooon
Joined: 04 Dec 2010
Total Posts: 4708
24 Sep 2015 06:01 PM
Usually you have to convert it to a localscript if it doesn't work in online mode.
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