generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Torso is not a valid member of model?

Previous Thread :: Next Thread 
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
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
Elemental_Code is not online. Elemental_Code
Joined: 11 May 2008
Total Posts: 13
18 Mar 2016 08:15 PM
Just a tip, use GetPlayers() instead of GetChildren()
Report Abuse
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
19 Mar 2016 08:45 AM
How come? What benefit does it give me?
Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
19 Mar 2016 08:48 AM
can it print the username? Check that.


Report Abuse
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
19 Mar 2016 08:54 AM
@Jacob

I'll try and do that,although it occurs once in a blue moon.
Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
19 Mar 2016 08:58 AM
Is a "blue moon" an instance in your game?


Report Abuse
malachi11 is not online. 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
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
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
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image