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: Scripting [Please reply need help]

Previous Thread :: Next Thread 
IvanTheEpic is not online. IvanTheEpic
Joined: 17 Nov 2011
Total Posts: 26
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
spyspace12 is not online. spyspace12
Joined: 16 Nov 2012
Total Posts: 615
17 Sep 2015 08:00 PM
umm place the audio in workspace duh.
Report Abuse
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
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
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
17 Sep 2015 08:19 PM
*just found a problem

I'II leave it to you to fix tho :D
Report Abuse
StayToasted is not online. StayToasted
Joined: 22 Dec 2012
Total Posts: 202
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
IvanTheEpic is not online. IvanTheEpic
Joined: 17 Nov 2011
Total Posts: 26
18 Sep 2015 12:48 PM
bump, need more help these scripts have failed me


Sincerely, IvanTheEpic
Report Abuse
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
18 Sep 2015 10:51 PM
Are you actually trying to fix them?
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
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
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