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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 May 2015 07:06 PM |
| the person below is a legend |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 May 2015 07:16 PM |
| bump. i guess im the legend |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 02 May 2015 07:35 PM |
| why does it have to be a localscript |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|