How do I remove the player's force field without breaking when the player doesn't have a force field?
local animation = Instance.new('Animation')
local animTrack
local debounce = false
local player = game.Players.LocalPlayer.Character
function onEquip()
script.Parent.Handle.UnsheathSound:Play()
end
function onActivate()
if not debounce then
debounce = true
player.ForceField:Destroy()
animation.AnimationId = "http://www.roblox.com/asset/?id=129967390"
animTrack = player.Humanoid:LoadAnimation(animation)
animTrack:Play()
script.Parent.Handle.SlashSound:Play()
script.Parent.Handle.Script.Disabled = false
wait(0.5)
animTrack:Stop()
script.Parent.Handle.Script.Disabled = true
wait(0.5)
debounce = false
end
end
function onUnequip()
animTrack:Stop()
end
script.Parent.Equipped:connect(onEquip)
script.Parent.Unequipped:connect(onUnequip)
script.Parent.Activated:connect(onActivate)

3 comments
Just check if he has a forcefield before you go and try to remove one. Do if player:FindFirstChild('ForceField') then player.ForceField:Destroy() end
Thanks it works!
you don't need a script to do that