can I see how the explorer looks like for both ProximityPrompt and PlayerGUI?
uhhh sure why not.
oh also it doesnt stop. it gives me no error. just it doesnt stop the audio
I see, where does the Sound Folder parented to?
to workspace
if you havent noticed by the script
I see, so what you are trying to do with the first script is
trying to put a Value on “TapePlaying” which is assuming the Audio’s ID.
This got me thinking that your TapePlaying = StringValue, that would store the Audio’s ID in it or maybe a bool Value.
So whenever your 2nd Script listens to that, TapeValue returns as 0 or nil or the AudioID because its not the “Sound” Instance.
So whenever you try to press “F” to skip the Sound, it returns a nil because there’s no audio you are trying to Stop. But just literally nil or the TapeValue’s Value itself.
tapeplaying is the actual audio. not the id. since u cant rlly stop an audio id
it used to be an object value. the object value was the audio. i checked when playing. i just need to get the audio somehow from the local script
i also removed the IF AUDIOVALUE IS NIL RETURN thing and it still gave me no error but it didint work
then TapeValue.Value is not what you want to achieve. Simply, you’d need to use a RemoteEvent to call the state of your Audio if its playing or not. If you only want for the LocalPlayer to achieve the skip or else it will skip for everyone else.
The simplest way is using RemoteEvents, and not using too much of the Values
- place a RemoteEvent and name it however you wanted
Server Side Script:
- Fire the client to send the state of your Audio if its playing or not
- is inside the ProximityPrompt
Client Side Script:
- it will listen whenever if your audio is playing or not
.
– if its playing, then the CanSkip Value will turn true
– and the function to be able to Skip by Pressing F is doable
.
– However, if CanSkip is false
– then the audio is not playing at all
OHHHHH. i get it. it doesnt detect this. even tho they are the same.
yes and will always return nil, as what I said in my previous comment
and if your script inside the Proximity is a Normal Script, and your 2nd script is a LocalScript then it won’t work (in some instances) and you’d need to actually use remote events for it.
well im stumped. im not rlly good at remote events unless its something easy. like enabling a value or a gui frame or smth
oh my god. i have an idea. stopping all the audio in the tapes folder.
is the game for multi-player or solo only?
singleplayer. most games i make are singleplayer. to make it easier
where does your local script parented to the one that can skip the audios? I’m trying to make the template here for you and see if this will be helpful for you
local script parented to the player. its in starterplayerscripts
also i tried using the stopping all audios thing. i did a [VARIABLE = FOLDER:GETCHILDREN()]
and i got this error when i tried stopping the audios.
welp, since its in StarterPlayerScripts you’d really need to use RemoteEvent for it to work, not just simply locating the values inside workspace.