The FF script is not working, I cannot figure out why. Can you help?
1 | while true do |
2 | game:FindFirstChild( "ForceField" ):remove() |
3 | end |
I wouldn't suggest using supercoolguy's method as the ForceField might not always exist. Instead, this code would not break:
1 | script.Parent.Touched:connect( function (touch) |
2 | if touch.Parent:FindFirstChild( "Humanoid" ) and touch.Parent:FindFirstChild( "ForceField" ) then |
3 | touch.Parent.ForceField:remove() |
4 | end |
5 | end ) |
Try this:
1 | function ff(part) |
2 | local h = part.Parent:findFirstChild( "Humanoid" ) |
3 | if h then |
4 | h.Parent.ForceField:Destroy() |
5 | end |
6 | end |
7 | script.Parent.Touched:connect(ff) |
The reason it isn't working is because ForceField isn't a child of Game, but the ForceField is a child of the Humanoids parent. Place this into a part.