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)
Even though you already got your answer, a WAY easier way you could disable the Force Field without using scripts is to go to the SpawnLocation Properties and change the Force Field Duration to 0
Locked by JesseSong
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?