strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:12 PM |
I'm doing a gui script and messing around with it and so I wanna play music right as it gets to a certain point of the gui, where it starts flashing colors and just loops.
So basically, how do i make it so that when my GUI gets to a certain point, it plays music then just keeps on looping the music? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Aug 2015 05:13 PM |
just tween the position and then play the music and set it to looped
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:14 PM |
| im new to scripting and i just copied the wiki script gui " Click me! " thing so i don't really know what tweening is lol |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Aug 2015 05:18 PM |
http://wiki.roblox.com/index.php?title=API:Class/GuiObject/TweenPosition
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:19 PM |
i don't know if this helps but lemme show you the script:
local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent
local textButton = Instance.new("TextButton") textButton.Parent = screenGui textButton.Position = UDim2.new(0, 0, 0, 0) textButton.Size = UDim2.new(0, 1950, 0, 825) textButton.BackgroundColor3 = BrickColor.White().Color textButton.Text = "Click Me!"
textButton.MouseButton1Down:connect(function() textButton.Text = "I've been clicked!" wait(2) textButton.Text = "DIE!!" wait(2) textButton.Text = "I've been cliDIE" wait(1) textButton.Text = "Oh no, the viruses are" wait(3) textButton.Text = "getting into me! HELP! HELL" wait(2) while true do textButton.Text = "DIE!" textButton.BackgroundColor3 = BrickColor.Random().Color wait(0.05) textButton.Text = "RUN" textButton.BackgroundColor3 = BrickColor.Random().Color wait(0.05) textButton.Text = "HIDE" textButton.BackgroundColor3 = BrickColor.Random().Color wait(0.05) textButton.Text = "KILL YOURSELF" textButton.BackgroundColor3 = BrickColor.Random().Color wait(0.05) textButton.Text = "SUICIDE" textButton.BackgroundColor3 = BrickColor.Random().Color wait(0.05) textButton.Text = "jk" textButton.BackgroundColor3 = BrickColor.Random().Color end end)
i want to start the music and just loop it right as it says the " DIE " after while true do ( yes i copied the wiki script ) |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:20 PM |
| and yeh its just for fun :P |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Aug 2015 05:21 PM |
After I saw the text names I stopped reading.
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
| |
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:23 PM |
| i just wanna know how to make the music start right as it gets to the second " DIE! " |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Aug 2015 05:23 PM |
music:Play() music.Looped = true
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:28 PM |
| where do i put that? right after the die? |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:29 PM |
because if i do, it shows a blue line under both music ( omgf why did i make two messages of this ) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Aug 2015 05:31 PM |
... because you have to define the variable music.
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
|
| 15 Aug 2015 05:33 PM |
| i know im going to sound really stupid.. but how |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Aug 2015 05:35 PM |
local music = workspace.Sound
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
strohboy4
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 125 |
|
| |
|