Im makng a game where if you are on a brick then you have an ff and if you are off the block then you lose your ff but the problem is the ff does not go away can someone fix my scripts please?
scrpt 1:
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
if (h.Parent:FindFirstChild("AreaShield") == nil) then
local a = script.AreaShield:clone()
a.Disabled = false
a.Parent = h.Parent
end
end
end
script.Parent.Touched:connect(onTouched)
script 2:
f = Instance.new("ForceField")
f.Parent = script.Parent
while true do
wait(.5)
if (script.Parent:FindFirstChild("Torso") ~= nil) then
if ((script.Parent.Torso.Position - game.Workspace.SafePlate.Position).magnitude > 64) then break end
else
break
end
end
f.Parent = nil
script.Parent = nil
