KazzzMann
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 619 |
|
|
| 23 Jan 2012 05:49 PM |
So in this script the vehicle is supposes to remove once the pwner is dead. It works just fine while I'm on the seat, but once I'm off of it then die it just stays there. Heres the script.
local plane = script.Parent.Parent local seat = script.Parent
function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then plane.Parent = hit.Parent end end
function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if human == nil then seat:remove() plane:remove() end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 23 Jan 2012 05:53 PM |
You honestly need to put...
Instance.new.Transparency = 1
I think that is it... I really just don't do Transparency things... |
|
|
| Report Abuse |
|
|
KazzzMann
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 619 |
|
|
| 23 Jan 2012 05:55 PM |
| *oops I just re-read my post I put "pwner" instead of owner. |
|
|
| Report Abuse |
|
|
KazzzMann
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 619 |
|
|
| 23 Jan 2012 05:55 PM |
| Just curious, but what will changing the Transparency of the plane do? |
|
|
| Report Abuse |
|
|
KazzzMann
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 619 |
|
| |
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 23 Jan 2012 06:14 PM |
| @Kazz He is being a troll dont listen to him. |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 23 Jan 2012 06:15 PM |
Oh and by the way do this,
local plane = script.Parent.Parent local seat = script.Parent
function onTouchedA(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then plane.Parent = hit.Parent end end
function onTouchedB(hit) local human = hit.Parent:findFirstChild("Humanoid") if human == nil then seat:remove() plane:remove() end end
script.Parent.Touched:connect(function(h) onTouchedA(h) onTouchedB(h) end)
Last time you were running only one function. This should run both. |
|
|
| Report Abuse |
|
|
KazzzMann
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 619 |
|
| |
|