This script is inside of a TextButton. When you click the button you're supposed to lose 1000 points and have a ForceField around you for one second, then the ForceField Destroys.
The problem is after i lose my points and wait one second, the ForceField doesn't destroy.
script.Parent.MouseButton1Click:connect(function()
if game.Players.LocalPlayer.Points.Value > 999 then
local ff = game.Players.LocalPlayer.Character:FindFirstChild("ForceField")
if not ff then
local f = Instance.new("ForceField",game.Players.LocalPlayer.Character)
game.Players.LocalPlayer.Points.Value = game.Players.LocalPlayer.Points.Value - 1000
wait(1)
print 'waited'
if ff then
print 'rip'
ff:Destroy()
end
end
end
end)

2 comments
line 9 (When fixed by the answer given) doesn't seem necessary unless somehow the ForceField will vanish in another way. You should just switch 9 out with "f:Destroy()" then where f:Destroy was before change
Well yeah but what if you reset?