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 » Scripting Helpers
Home Search
 

how to check if the plane's parent is a player

Previous Thread :: Next Thread 
vippass22 is not online. vippass22
Joined: 12 Dec 2009
Total Posts: 45
23 Jul 2012 11:28 AM
-Plane
-script
->>if (game.Players:findFirstChild(script.Parent.Parent)) then...<<
_____________________________________________________________________________
I dont think this is the correct way to check :l
Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
23 Jul 2012 11:32 AM
You got it.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
23 Jul 2012 11:39 AM
if script.Parent:IsA("Player") then --WORKSPACE not PLAYERS
--code
end

You could do it that way, but I would recommend using the GetPlayerFromCharacter method.
Report Abuse
ColorlessBody is not online. ColorlessBody
Joined: 21 Jun 2012
Total Posts: 193
23 Jul 2012 11:41 AM
To know if the parent is a player:

script.Parent:IsA('Player')

To know if the parent is a player's character:

Game:GetService('Players'):GetPlayerFromCharacter(script.Parent)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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