Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Setting a Sound's TimePosition with FilteringEnabled?

Asked by
ausmel105 140
8 years ago

Hi all,

I'm not entirely sure if there is a solution to this problem, as I've exhausted everything I could think of.

So I have a sound, within a part and I want to change the TimePosition property. From the wiki, I gather that only clients can alter this property. http://wiki.roblox.com/index.php?title=API:Class/Sound

But when attempting to change this property from a LocalScript within a GUI, I get this error:

Sound.TimePosition was set from local script while either in Workspace or SoundService. Only use a server script to set TimePosition when a sound is in these locations.

So.. I did exactly that and tried it on a server script, but again.. No change in position for any of the clients.

I'm not sure where to turn now so I need you guys' help.

Thanks :)

0
Where exactly is the Sound located? gskw 1046 — 8y
0
a part within workspace ausmel105 140 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

If the sound is located somewhere in workspace or soundservice then you cant modify it because filtering enabled doesnt allow local scripts to modify any instance in workspace. Because your making a sound for a gui why do you need to put it in workspace? You can easily put it in startergui/starterpack and modify any property. If you really need it in the workspace then I suggest using a remoteevent to pass arguments when the sound is paused or is stopped or reaches a specific time then put the timeposition in the argument and use it to change the property in the server script.

0
I don't think you understand, the sound *needs* to be in a part within Workspace. Additionally, I do know how RemoteEvents work.. that's not the issue. As far as your solution goes regarding editing the property using a server script, if you actually bothered to read the wiki, you would see that server scripts are not able to read and manipulate sound properties such as TimeLength and TimePosition ausmel105 140 — 8y
Ad

Answer this question