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 » Scripting Helpers
Home Search
 

Re: PlayerAdded & CharacterAdded

Previous Thread :: Next Thread 
NuselKaie is not online. NuselKaie
Joined: 24 Oct 2013
Total Posts: 939
08 Nov 2013 11:25 AM
game.Players.PlayerAdded:connect(function(player)
player.ChildAdded:connect(function(character)
local localplayer = game.Players.LocalPlayer
local sound = script.Sound:Clone()
sound.Parent = localplayer.PlayerGui
sound:Play()
sound.Looped = true


end)
end)

This doesn't do anything (and I was told that it doesn't work in Solo mode anyway). But in Multiplayer it still doesn't work. It is a local script, by the way!
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
08 Nov 2013 11:32 AM
Remover player added and use local player = game.Players.LocalPlayer
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
08 Nov 2013 11:34 AM
check if the sound is working with the command bar

else

add a wait

also


game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character) -- y u no use characteradded
local localplayer = game.Players.LocalPlayer
local sound = script.Sound:Clone()
sound.Parent = localplayer.PlayerGui
sound:Play()
sound.Looped = true


end)
end)
Report Abuse
NuselKaie is not online. NuselKaie
Joined: 24 Oct 2013
Total Posts: 939
08 Nov 2013 11:44 AM
What..? I'm confused.

Use character added? I did?
Use local player. Where?
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
08 Nov 2013 11:49 AM
you used
player.ChildAdded:connect(function(character)

i used
player.CharacterAdded:connect(function(character)

protip:
use starterpack
Report Abuse
NuselKaie is not online. NuselKaie
Joined: 24 Oct 2013
Total Posts: 939
09 Nov 2013 03:06 AM
Didn't notice that I used child added. :p
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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