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 this short script work?

Previous Thread :: Next Thread 
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
20 Nov 2015 06:09 PM
game.Workspace.Forever:Play()
wait(0.1)
game.Workspace.Forever.TimePosition = 60

I get the feeling I'm doing something wrong with the 60.
(P.S, yes I'm an idiot)
Report Abuse
coolmatt3 is not online. coolmatt3
Joined: 12 Jul 2010
Total Posts: 778
20 Nov 2015 06:15 PM
Script works fine.

Just put the script inside the Audio thingy


song = script.Parent

song:Play()
wait()
song.TimePosition = 60
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
20 Nov 2015 06:23 PM
It's still not working for some reason. It just plays the song from the start, nothing in output.
Report Abuse
coolmatt3 is not online. coolmatt3
Joined: 12 Jul 2010
Total Posts: 778
20 Nov 2015 06:32 PM
maybe it's the song
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
21 Nov 2015 10:24 AM
Bump
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
21 Nov 2015 10:39 AM
What is the song's actual length?


It never ceases to amaze me. Kids make sure we know who they are with wild allegations then act like we talk about them. Random egos.
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
21 Nov 2015 10:53 AM
119 seconds
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
21 Nov 2015 10:57 AM
Question, do you just want it to start playing at 60?


It never ceases to amaze me. Kids make sure we know who they are with wild allegations then act like we talk about them. Random egos.
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
21 Nov 2015 10:59 AM
It's part of a preview script, it plays the song halfway through for ten seconds and then stops
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
21 Nov 2015 11:02 AM
If you just want it to play for 60 seconds from halfway through, try this:

Hierarchy
Sound>Script

script.Parent.TimePosition = "60"
script.Parent:Play
wait(10)
script.Parent:Pause()


It never ceases to amaze me. Kids make sure we know who they are with wild allegations then act like we talk about them. Random egos.
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
21 Nov 2015 11:03 AM
I mean that will play for 10 seconds from halfway through whenever the game loads up.


It never ceases to amaze me. Kids make sure we know who they are with wild allegations then act like we talk about them. Random egos.
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
21 Nov 2015 11:04 AM
Oh my gosh I am off my game today sorry,
make the
script.Parent:Play
into
script.Parent:Play()


It never ceases to amaze me. Kids make sure we know who they are with wild allegations then act like we talk about them. Random egos.
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
21 Nov 2015 11:07 AM
Haha, the only problem is that I want to keep the sound in the workspace since its a button activating the script in the first place. Is that possible?
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
21 Nov 2015 11:11 AM
Sure thing, glad to help

Hierarchy:
Part>Sound,ClickDetector,Script

script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.Sound:Pause()
script.Parent.Sound.TimePosition = "60"
script.Parent.Sound:Play()
wait(10)
script.Parent.Sound:Pause()
end)


It never ceases to amaze me. Kids make sure we know who they are with wild allegations then act like we talk about them. Random egos.
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
21 Nov 2015 11:13 AM
Alright, thanks. I'll try this when I get home ^^
Report Abuse
Xyka is not online. Xyka
Joined: 27 Apr 2010
Total Posts: 174
21 Nov 2015 11:14 AM
Alright thanks, I'll try this when I get home ^^
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