|
| 17 Sep 2015 07:59 PM |
So I have the audio in the StarterGui and this very very basic script in workspace
game.Workspace.Sound:Play()
If anybody knows how to make it so the audio only plays when a player enters the game and, in the server *ONLY* the player who enters can hear the audio, If anyone can reply to me this would be helpful for I need the audio for a game intro.
Sincerely, IvanTheEpic |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2015 08:00 PM |
| umm place the audio in workspace duh. |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2015 08:10 PM |
Idk what ^ that is
just do something like this
function AddMusicPlay(player) local a = Instance.new("Sound") a.Name = keepConsistent a.Parent = player a.MusicID = musicID a:Play() end
function MusicEnded(player) if player.keepConsistent then local c = player.keepConsistent c:Destroy() end end
game.Players.PlayerAdded:connect(AddMusicPlay) local b = player.keepConsistent b.Ended:connect(MusicEnded) |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2015 08:19 PM |
*just found a problem
I'II leave it to you to fix tho :D |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2015 08:46 PM |
I would say connect the whole function to
game.Players.PlayerAdded:connect(function(player)
sound.Parent = player.PlayerGui 'Your script here'
end)
and after its done playing make it so it removes and it should never pop back in again |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2015 12:48 PM |
bump, need more help these scripts have failed me
Sincerely, IvanTheEpic |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2015 10:51 PM |
| Are you actually trying to fix them? |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2015 10:59 PM |
local sound = script.JoinSound game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character and player.Character:FindFirstChild("Humanoid") sound.Parent = player.PlayerGui sound:Play() end)
Try something like that? Not sure if the "until player.Character " does anything haha, can't test it right now.
-The [Guy] |
|
|
| Report Abuse |
|
|