|
| 27 Mar 2015 11:19 PM |
Ok, so I have this onRespawn function put a GUI into the player when they enter the game and if they die/reset. When in solo it works fine. But when in Test mode or online it only works when the player spawns for the first time? Any ideas? Thanks, Cold.
function onRespawn(char) local players = game.Players:GetPlayers() local gameUI = script.LobbyMenu:Clone()
for i,v in pairs(players)do gameUI.Parent = v.PlayerGui end end
function onEntered(player) player.CharacterAdded:connect(function(player) onRespawn(player) end) end
game.Players.PlayerAdded:connect(function(player) onEntered(player) end) game.Workspace.CharacterAdded:connect(function(player) onRespawn(player) end) |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2015 12:17 PM |
"game.Players.PlayerAdded:connect(function(player) onEntered(player) end) game.Workspace.CharacterAdded:connect(function(player) onRespawn(player) end)"
Why do people do this? Is this like an old scripting method?
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) --stuff end) end) |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2015 03:23 PM |
| Still, With that one when on Solo works perfectly fine, But when online or on "test" it only works on playerentry.. |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Mar 2015 09:45 PM |
| Bump[2] Just a note, Filtering-Enabled is set to true in this game. |
|
|
| Report Abuse |
|
|