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: OnEnter player music

Previous Thread :: Next Thread 
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 06:38 PM
If I have a sound inside of a local script in the Starterpack, how do I make it play when the player enters the game?
Report Abuse
MajikkuSoul is not online. MajikkuSoul
Joined: 15 Feb 2014
Total Posts: 196
02 May 2015 06:39 PM
game.Players.PlayerAdded:connect(function()

end)


~ All you need to know is that I'm an otaku
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 06:42 PM
I thought the player added event doesn't work in a local script in the starterpack
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 06:52 PM
k bump
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 06:59 PM
banana
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 07:06 PM
the person below is a legend
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 07:16 PM
bump. i guess im the legend
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 07:20 PM
im gona have a bf
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
02 May 2015 07:23 PM
in replacement of playeradded you can do

game.Players.ChildAdded:connect(function(plr)
if plr:IsA("Player") then
--normal PlayerAdded stuff here
end
end)
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
02 May 2015 07:23 PM
repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character -- This waits for the character and player to load
local player = game.Players.LocalPlayer
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 07:34 PM
@abstract

so i have this

game.Players.ChildAdded:connect(function(plr)
if plr:IsA("Player") then
sou = script.SoundOP
sou.Volume = 1
sou:Play()
end
end)

and it works perfectly in test mode but not when you actually go in the game. it's in a local script in the starterpack
Report Abuse
tyleralex123 is not online. tyleralex123
Joined: 01 Apr 2009
Total Posts: 19934
02 May 2015 07:35 PM
why does it have to be a localscript
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 May 2015 09:32 PM
because the rest of my script is in local script form which is 65 lines and i would not like to change it al
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
03 May 2015 11:42 AM
what do i do
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