F18ACE
|
  |
| Joined: 24 Jun 2015 |
| Total Posts: 4025 |
|
|
| 26 Jun 2016 10:00 PM |
| I'm trying to make a script that will turn a player invisible when they enter a seat. Does anybody here know the pathfinding I should use to identify the parts? (torso, Arm1, etc.) |
|
|
| Report Abuse |
|
|
F18ACE
|
  |
| Joined: 24 Jun 2015 |
| Total Posts: 4025 |
|
| |
|
|
| 26 Jun 2016 10:08 PM |
| Pathfinding isn't really related to that at all. Just connect a Changed event to the seat and check and see if the 'Occupant' property was changed when it's fired. If it was, get the value of that property (which would be a Player object if it's not nil), get the player's character and then iterate through it and set the transparency for everything that is a BasePart to 0. |
|
|
| Report Abuse |
|
|
F18ACE
|
  |
| Joined: 24 Jun 2015 |
| Total Posts: 4025 |
|
|
| 26 Jun 2016 10:10 PM |
| I already have the activation line, I just need to know how to identify the parts. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2016 10:20 PM |
Well, if you want to see what type of limb it is, just include a check.
if (part.Name == "Right Arm") then -- code here end |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 26 Jun 2016 10:21 PM |
for i,v in pairs (Character:GetChildren()) do if v:IsA"BasePart" then v.Transparency=1 end end
gibbe ur hats https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=10537769 |
|
|
| Report Abuse |
|
|
F18ACE
|
  |
| Joined: 24 Jun 2015 |
| Total Posts: 4025 |
|
| |
|
F18ACE
|
  |
| Joined: 24 Jun 2015 |
| Total Posts: 4025 |
|
|
| 26 Jun 2016 10:25 PM |
| just tried the script, but nothing happened. |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 26 Jun 2016 10:26 PM |
you have to define Character
gibbe ur hats https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=10537769 |
|
|
| Report Abuse |
|
|
F18ACE
|
  |
| Joined: 24 Jun 2015 |
| Total Posts: 4025 |
|
|
| 26 Jun 2016 10:26 PM |
| The script already has it defined as "player", but it still didn't work after changing it. |
|
|
| Report Abuse |
|
|