DrizziPop
|
  |
| Joined: 01 Oct 2014 |
| Total Posts: 1914 |
|
|
| 02 Apr 2016 01:27 PM |
ok so im bad at explaining but ill try to say it
pretend i used this
while true do if game.players.numplayers > 1 then a = instance.new("hint") a.parent = game.workspace a.Text = "idk" elseif game.players.numplayers <= 1 then print("2 or more players r needed idk y im printing this in console lol") end
how do i make it so everything in game.players.numplayers > 1 gets removed when the player count goes back to one (if a person leaves)
|
|
|
| Report Abuse |
|
|
DrizziPop
|
  |
| Joined: 01 Oct 2014 |
| Total Posts: 1914 |
|
| |
|
DrizziPop
|
  |
| Joined: 01 Oct 2014 |
| Total Posts: 1914 |
|
| |
|
|
| 02 Apr 2016 01:30 PM |
| why did you bump this barely a minute after posting |
|
|
| Report Abuse |
|
|
DrizziPop
|
  |
| Joined: 01 Oct 2014 |
| Total Posts: 1914 |
|
| |
|
|
| 02 Apr 2016 01:31 PM |
Maybe this? local NumPlayers = game.Players.NumPlayers NumPlayers.Changed:connect(function() if NumPlayers > 1 then a = Instance.new("Hint") a.Name = "TheHint" a.Parent = game.Workspace a.Text = "idk"
elseif NumPlayers <= 1 then
a = game.Workspace:FindFirstChild("TheHint") if a ~= nil then a:Destroy() end end end) |
|
|
| Report Abuse |
|
|
DrizziPop
|
  |
| Joined: 01 Oct 2014 |
| Total Posts: 1914 |
|
|
| 02 Apr 2016 01:32 PM |
| ya but what if i have like a bunch of things running like guis, part clones and stuff |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 01:33 PM |
"how do i make it so everything in game.players.numplayers > 1"
game.players.numplayers > 1 is not an instance. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 01:34 PM |
| @Drizzi What do you mean? Elaborate further. |
|
|
| Report Abuse |
|
|
DrizziPop
|
  |
| Joined: 01 Oct 2014 |
| Total Posts: 1914 |
|
|
| 02 Apr 2016 01:37 PM |
| like im working on a minigames game and its going to like have things such as a time left gui, cloning the minigame map, etc. i want to make it so if there is only 1 player left, all the items that got cloned back when there was more than 1 player gets deleted |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 01:43 PM |
Just add a check at the start of all the function that checks how many players are in the game, and if there is the required amount, continue on with the script.
|
|
|
| Report Abuse |
|
|