yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 27 Apr 2014 10:39 AM |
How do i make it so when a player touches a certain brick there ff removes.
would it be along the lines of-
function onTouch(player) player.Humanoid.ForceField:Destroy() end |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 27 Apr 2014 10:45 AM |
script.Parent.Touched:connect(function(t) while wait(0) do if t.Parent.ForceField ~= nil then t.Parent.ForceField = nil end end end) |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 27 Apr 2014 10:47 AM |
| No because while wait(0) do lags out the game -_- |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
|
| 27 Apr 2014 10:53 AM |
script.Parent.Touched:connect(function(hit) local hum = hit.Parent:findFirstChild('Humanoid'); if hum ~= nil then local ff = hum.Parent:findFirstChild('ForceField'); if ff ~= nil then ff:Destroy(); end end end)
im sure you can change this or whatever
#nerdsunited |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 27 Apr 2014 10:54 AM |
No, it doesn't It just means do this every second and chances are it barely does what I tell it to do cx |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|