|
| 18 Mar 2016 07:34 PM |
This is my code,
for i, v in pairs(game.Players:GetChildren()) do if v.PlayerGui:findFirstChild("TreasureGui") then v.Character.Torso.CFrame = v.PlayerGui.TreasureGui.Total.Value == 5 and podium.Spawns.Winner.CFrame or podium.Spawns["Place"..v.PlayerGui.Values.Place.Value].CFrame end end
It's only happened once out of the many times I've used it, surely the player would have to leave at a really precise time for this to happen.
I know I can check for the player's torso, can anybody think of why this would happen? |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2016 08:15 PM |
Just a tip, use GetPlayers() instead of GetChildren()
|
|
|
| Report Abuse |
|
|
|
| 19 Mar 2016 08:45 AM |
| How come? What benefit does it give me? |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2016 08:48 AM |
can it print the username? Check that.
|
|
|
| Report Abuse |
|
|
|
| 19 Mar 2016 08:54 AM |
@Jacob
I'll try and do that,although it occurs once in a blue moon. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2016 08:58 AM |
Is a "blue moon" an instance in your game?
|
|
|
| Report Abuse |
|
|
malachi11
|
  |
| Joined: 07 May 2008 |
| Total Posts: 2420 |
|
|
| 19 Mar 2016 10:03 AM |
for i, v in pairs(game.Players:GetPlayers()) do if v.PlayerGui:findFirstChild("TreasureGui") then if (v.Character and v.Character:FindFirstChild("Torso")) then --This checks if the player has a character and if it's torso exists. v.Character.Torso.CFrame = v.PlayerGui.TreasureGui.Total.Value == 5 and podium.Spawns.Winner.CFrame or podium.Spawns["Place"..v.PlayerGui.Values.Place.Value].CFrame end end end |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2016 11:28 AM |
@Jacob
I can't tell whether that's a joke or not. If not, I mean, very rarely.
@Mal
Yeah thanks, that's what I ended up doing. I just have no idea why this would happen in the first place. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2016 11:29 AM |
I didn't know if you meant a blue moon as in rl, or if you did something in your game.
|
|
|
| Report Abuse |
|
|