Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

FF Remover not working? [SOLVED, THANKS FOR HELP]

The FF script is not working, I cannot figure out why. Can you help?

while true do
game:FindFirstChild("ForceField"):remove()
end

1 comment

0

Alright. Thanks!

2 answers

✓ Accepted answer

I wouldn't suggest using supercoolguy's method as the ForceField might not always exist. Instead, this code would not break:

script.Parent.Touched:connect(function(touch)
	if touch.Parent:FindFirstChild("Humanoid") and touch.Parent:FindFirstChild("ForceField") then
		touch.Parent.ForceField:remove()
	end
end)

Try this:

function ff(part)
	local h = part.Parent:findFirstChild("Humanoid")
	if h then
		h.Parent.ForceField:Destroy()
	end
end
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.

1 comment

0

Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.