|
| 31 Dec 2015 10:46 PM |
I already did some of it: function onPlayerEntered(player) game:GetService('Players').PlayerAdded:connect(function(player) local player = game:GetService('Players') local playergui = player:WaitForChild('PlayerGui') if player and playergui then if playergui:FindFirstChild(sound1.Name) == nil then sound1.Parent = playergui sound2.Parent = playergui end end end) end
but I need to update the local player line I don't know how to change it |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2015 11:05 PM |
also I might be going about this wrong too if so please tell me :^) |
|
|
| Report Abuse |
|
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 31 Dec 2015 11:09 PM |
game:GetService('Players').PlayerAdded:connect(function(player) local playergui = player:WaitForChild('PlayerGui') if player and playergui then if playergui:FindFirstChild(sound1.Name) == nil then sound1.Parent = playergui sound2.Parent = playergui end end end) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2015 11:10 PM |
Local scripts do not require you to use PlayerAdded, they are automatically added to the Player each time they respawn. You can use game.Players.LocalPlayer to define the Player quickly by using local scripts. |
|
|
| Report Abuse |
|
|