|
| 21 Nov 2015 12:13 AM |
What I'm going for is that when ThePerson joins the game, it will play SoundNameHere. Will this work correctly?
ThePerson = "Player's Name Here" game.Players.PlayerAdded:connect(function(p) if p.Name == ThePerson then script.Parent.SoundNameHere.IsPlaying = true end
ᗩᘉᓰᗰᗩ☂ᕮↁᗪᗩᘉᘉϒ〇 |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 21 Nov 2015 12:14 AM |
IsPlaying is a read value, do
sound:Play()
Instead
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 21 Nov 2015 12:15 AM |
you should use the Play() method instead otherwise it won't work.
script.Parent.SoundNameHere:Play() |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2015 12:15 AM |
so
script.Parent.SoundNameHere.sound:Play()
right?
ᗩᘉᓰᗰᗩ☂ᕮↁᗪᗩᘉᘉϒ〇 |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2015 12:16 AM |
script.Parent.SoundNameHere:Play()
ok
ᗩᘉᓰᗰᗩ☂ᕮↁᗪᗩᘉᘉϒ〇 |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 21 Nov 2015 12:16 AM |
| yup, assuming you have the path correct (script.Parent.SoundNameHere or whatever it's called) it should work fine. |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2015 12:17 AM |
Red line under 'end'. What's wrong w/ it?
ᗩᘉᓰᗰᗩ☂ᕮↁᗪᗩᘉᘉϒ〇 |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 21 Nov 2015 12:17 AM |
actually you forgot an end..
ThePerson = "Player's Name Here" game.Players.PlayerAdded:connect(function(p) if p.Name == ThePerson then script.Parent.SoundNameHere:Play() end end) |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2015 12:18 AM |
ah thank you
ᗩᘉᓰᗰᗩ☂ᕮↁᗪᗩᘉᘉϒ〇 |
|
|
| Report Abuse |
|
|