|
| 05 Jun 2016 06:16 PM |
Because, the script seems to be skipping the wait in all of mine.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jun 2016 07:04 PM |
| Your computer might be running insanely fast (it's clock is fast) so that 1 sec. is actually equal to .00000000000000000000001 sec. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 05 Jun 2016 07:07 PM |
If they broke waits in local scripts, Roblox would be destroyed
so, I'm willing to put my money on the idea that it's an issue in your code
|
|
|
| Report Abuse |
|
|
Zawie
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 6338 |
|
|
| 05 Jun 2016 07:25 PM |
post code you are probably using a coroutine or firing a function every event |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:23 PM |
The code hasn't had said problem, 'till today. I haven't edited it in a few days.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 05 Jun 2016 08:24 PM |
Well if it's not broke, then why's it not working?
The only other answers are that something your script RELIES on is broken, or something your script tries to affect isn't there.
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:25 PM |
Do you think ROBLOX might of broke the TimeLength of a sound then? lol, I am using the TimeLength of a sound for the wait.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 05 Jun 2016 08:26 PM |
Pretty sure that still works
wait(sound.TimeLength)
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:26 PM |
Well, I will post the code, gimme a few mins to open Studio.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:31 PM |
repeat wait() until game.Players.LocalPlayer repeat wait() until game.Players.LocalPlayer:FindFirstChild("Custom") repeat wait() until game.Players.LocalPlayer:FindFirstChild("PlayerGui")
while true do
local music = {"220162737", "161249444", "264608600","151978760","169804840", "331704247", "202517493", "273818184", "142277348", "222095512", "207012155", "206916443", "181065299", "247765612", "253050461", "192068111", "313402757", "304137663", "195453449", "237428156", "234503084", "212645485", "276974547", "284535161", "189651055", "176745248", "290880321"} local Custom = game.Players.LocalPlayer.Custom local vol = game.Players.LocalPlayer.PlayerGui.Menu.Options.Music.TextBox.vol.Value local custom = {} local sng = coroutine.create(function(id,pit,loop) for _, v in pairs(game.Players:GetChildren()) do repeat wait() until v:FindFirstChild("PlayerGui") local s = Instance.new("Sound", v.PlayerGui) s.Name = "Music" s.SoundId = "rbxassetid://"..id s.vol.Valueume = 0 s.Pitch = pit s.Looped = loop s:Play() for i = 1,vol.Value * 10 do s.vol.Valueume = s.vol.Valueume + .1 wait(.05) end end end) local clrsng = coroutine.create(function() for _, v in pairs(game.Players:GetChildren()) do for _, c in pairs(v:WaitForChild('PlayerGui'):GetChildren()) do if c:IsA("Sound") and c.Name == "Music" then for i = 1,vol.Value * 10 do c.vol.Valueume = c.vol.Valueume - .1 wait(.05) end c:remove() end end end end) if Custom.Value == false then coroutine.resume(sng, music[math.random(1,#music)], 1 , false) else local song = 0 for _, v in pairs(script:GetChildren()) do table.insert(custom,1,v.Value) end coroutine.resume(sng, custom[math.random(1,#custom)], 1 , false) end wait(game.Players.LocalPlayer.PlayerGui.Music.TimeLength) coroutine.resume(clrsng) for _, v in pairs(custom) do
table.remove(custom,1) end wait(.2) end
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:32 PM |
yeah-no
roblox doesn't break anything*, it's just that your code is bad
*unless you're using hacky ways of achieving things |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:33 PM |
Also, yes I see the spelling mistakes, I just finished editing the script, with the 'replace', I will add the fixed code
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:33 PM |
| FYI I was writing that before you posted your code |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:34 PM |
--Fixed code
repeat wait() until game.Players.LocalPlayer repeat wait() until game.Players.LocalPlayer:FindFirstChild("Custom") repeat wait() until game.Players.LocalPlayer:FindFirstChild("PlayerGui")
while true do
local music = {"220162737", "161249444", "264608600","151978760","169804840", "331704247", "202517493", "273818184", "142277348", "222095512", "207012155", "206916443", "181065299", "247765612", "253050461", "192068111", "313402757", "304137663", "195453449", "237428156", "234503084", "212645485", "276974547", "284535161", "189651055", "176745248", "290880321"} local Custom = game.Players.LocalPlayer.Custom local vol = game.Players.LocalPlayer.PlayerGui.Menu.Options.Music.TextBox.vol.Value local custom = {} local sng = coroutine.create(function(id,pit,loop) for _, v in pairs(game.Players:GetChildren()) do repeat wait() until v:FindFirstChild("PlayerGui") local s = Instance.new("Sound", v.PlayerGui) s.Name = "Music" s.SoundId = "rbxassetid://"..id s.vol.Valueume = 0 s.Pitch = pit s.Looped = loop s:Play() for i = 1,vol.Value * 10 do s.Volume = s.Volume + .1 wait(.05) end end end) local clrsng = coroutine.create(function() for _, v in pairs(game.Players:GetChildren()) do for _, c in pairs(v:WaitForChild('PlayerGui'):GetChildren()) do if c:IsA("Sound") and c.Name == "Music" then for i = 1,vol.Value * 10 do c.Volume = c.Volume - .1 wait(.05) end c:remove() end end end end) if Custom.Value == false then coroutine.resume(sng, music[math.random(1,#music)], 1 , false) else local song = 0 for _, v in pairs(script:GetChildren()) do table.insert(custom,1,v.Value) end coroutine.resume(sng, custom[math.random(1,#custom)], 1 , false) end wait(game.Players.LocalPlayer.PlayerGui.Music.TimeLength) coroutine.resume(clrsng) for _, v in pairs(custom) do
table.remove(custom,1) end wait(.2) end
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:40 PM |
Note... I didn't fix all the spelling mistakes I just made a couple minutes, ago, so if you see 'vol.Valueume' assume that is just Volume
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 05 Jun 2016 08:40 PM |
I'm just going to assume that this script needs a lot more tender loving care X)
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:41 PM |
| i was going to help you fix it but instead i'm going to focus my energy on not fainting now |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:41 PM |
lol, i really haven't messed with the script up until now, trying to see if i could fix the problem myself, before posting code, so I just made a few spelling errors.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 05 Jun 2016 08:42 PM |
Spelling errors are big errors. You should scour this with a fine-tooth comb - it's a pretty lengthy chunk of code!
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:43 PM |
it didnt have spelling errors, 'till i recently tried to fix it with the 'Replace' text thing, x3. I am fixing it rn in studio.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 08:46 PM |
Weird, the script is working now, welp, thanks for the help anyhow.
#Code warn("Fancy yellow print") |
|
|
| Report Abuse |
|
|