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: How do I check if a player is sitting inside a vehicle seat?

Previous Thread :: Next Thread 
DesiredROBLOXlAN is not online. DesiredROBLOXlAN
Joined: 01 Mar 2012
Total Posts: 971
08 Aug 2016 03:01 AM
Thanks in advance!


~The most desired of Robloxians
Report Abuse
Encladeus is not online. Encladeus
Joined: 27 Dec 2010
Total Posts: 3839
08 Aug 2016 03:29 AM
script.Parent.VehicleSeat.ChildAdded:connect(function(child)
if child.Name == 'SeatWeld' then
local Player = child.Part1.Parent
end
end)

When someone sits on your vehicle seat, this function returns the player character as the 'Player' varible

if you want to find that Character's player object add the following: local Character = Player:GetPlayerFromCharacter()
Report Abuse
Poine is not online. Poine
Joined: 14 Aug 2011
Total Posts: 391
08 Aug 2016 03:29 AM
Seat.Occupant


Report Abuse
DesiredROBLOXlAN is not online. DesiredROBLOXlAN
Joined: 01 Mar 2012
Total Posts: 971
08 Aug 2016 03:36 AM
Alright thanks!


~The most desired of Robloxians
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