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: How would i make preload my sword's sounds ?

Previous Thread :: Next Thread 
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
03 Aug 2016 05:46 PM
I checked the wiki i saw that preloading loads ur sounds before game starts or how ? But im kinda confused where do u put the line at and how do i preload sounds for my sword ?

Ex: i load the sounds then how do i use them for sword ? Pls explain kinda confused here :/ thanks !
Report Abuse
DivinePheonix is not online. DivinePheonix
Joined: 30 Mar 2011
Total Posts: 11190
03 Aug 2016 06:10 PM
http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
03 Aug 2016 06:28 PM
Oh my god, seriously? I said i ALREADY CHECKED it and i am confused on how it works please read my whole post again, if u can't answer don't post anything.. PLEASE
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 05:57 AM
...


Report Abuse
Laedere is not online. Laedere
Joined: 17 Jun 2013
Total Posts: 23601
04 Aug 2016 06:00 AM
Have you tried this article on the Wiki? I think it will help you
http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload


Report Abuse
bloberous is not online. bloberous
Joined: 07 Jun 2009
Total Posts: 299
04 Aug 2016 06:55 AM
No don't send him that one. Use this page instead:

http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload
Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
04 Aug 2016 06:57 AM
Here, I edited this one. (It prints the name of the asset for added coolness)

local ContentProvider = game:GetService("ContentProvider")

local function LoadAssets(AssetList)

for _, AssetId in pairs(AssetList) do
ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId)
local Asset = game:GetService('MarketplaceService'):GetProductInfo(AssetId)
print("Loaded "..AssetId.." ("..Asset.Name..")")
end
end


LoadAssets({ID1, ID2, ID3})
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 07:15 AM
local ContentProvider = game:GetService("ContentProvider")

local function LoadAssets(AssetList)
for _, AssetId in pairs(AssetList) do
ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId)
end
end

LoadAssets({1,2,3})

U can only give wikis, means u are free posters. So what i've tried this script i said it won't work, my sounds work fully after first try then later only half of it can be heard or even can't be heard it doesn't work...


Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 07:17 AM
I said that i've checked the wiki, they're still posting to annoy me.. lol no wonder why they have 10k + posts, noobs


Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
04 Aug 2016 07:17 AM
Replace the ID1 and ID2 and ID3 with the sound IDs
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 07:30 AM
It prints that it loaded, but still sounds r messy and they don't play fully


Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
04 Aug 2016 07:34 AM
Not sure what could be causing that to be completely honest, sounds like an issue with your sword, I don't think pre-loading is causing that.
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 07:37 AM
Add me, i'll show you my game


Report Abuse
bloberous is not online. bloberous
Joined: 07 Jun 2009
Total Posts: 299
04 Aug 2016 07:38 AM
I find it hard to believe that you're using assets:

http://www.roblox.com/asset/?id=1
http://www.roblox.com/asset/?id=2
http://www.roblox.com/asset/?id=3

Find out the actual asset ID for your sword sounds and place them in the table. If they're for example:

http://www.roblox.com/asset/?id=151253
http://www.roblox.com/asset/?id=253251
http://www.roblox.com/asset/?id=354131

Then change your table:

LoadAssets({151253, 253251, 354131})
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 08:15 AM
lol, no u didn't understand me at all


Report Abuse
bloberous is not online. bloberous
Joined: 07 Jun 2009
Total Posts: 299
04 Aug 2016 08:17 AM
Are you using this exact script?

local ContentProvider = game:GetService("ContentProvider")

local function LoadAssets(AssetList)
for _, AssetId in pairs(AssetList) do
ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId)
end
end

LoadAssets({1,2,3})
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
04 Aug 2016 09:06 AM
...If your asset link is already in an object that the client must load, I'm 99.999% sure it's already "preloaded" before you use it.

Sounds being "messy" and "not playing fully" does not sound like a preloading issue.


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
04 Aug 2016 09:07 AM
Preload assets on the local client

or

put sound assets inside the sword


either way will preload any sounds
Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 11:18 AM
I used praetorianthegod's script put it into the startergui, and putted all sounds of my sword's it still doesn't work and the sound cuts off for me... :/


Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 11:21 AM
https://www.roblox.com/games/455075449/RGtest join me if u can, for me it cuts off other say for them it doesn't...


Report Abuse
Bulvyte is not online. Bulvyte
Joined: 21 May 2014
Total Posts: 716
04 Aug 2016 11:27 AM
Maybe, the animation's are the problem ?


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