ThraxPain
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 183 |
|
|
| 29 Jun 2015 01:42 PM |
| Can I get a script where when you're touching a brick, you get a forcefield UNTIL you stop touching the brick. No magnitude or anything. Thanks in advance |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2015 01:46 PM |
local p = workspace.Part
p.Touched:connect(function(h) if h:findFirstChild'Humanoid' then Instance.new("ForceField",h.Parent) end end) p.TouchEnded:connect(function(h) if h:findFirstChild'Humanoid' then h.Parent.ForceField:Destroy() end end)
that's a start; just add a debounce and make it efficient |
|
|
| Report Abuse |
|
|
ThraxPain
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 183 |
|
|
| 29 Jun 2015 01:50 PM |
| It is not working. But there are no errors. |
|
|
| Report Abuse |
|
|
| |
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 29 Jun 2015 02:07 PM |
| There isn't a "humanoid" inside "h". |
|
|
| Report Abuse |
|
|