How do I remove the player's force field without breaking when the player doesn't have a force field?
01 | local animation = Instance.new( 'Animation' ) |
02 | local animTrack |
03 | local debounce = false |
04 | local player = game.Players.LocalPlayer.Character |
05 |
06 | function onEquip() |
07 | script.Parent.Handle.UnsheathSound:Play() |
08 | end |
09 |
10 | function onActivate() |
11 | if not debounce then |
12 | debounce = true |
13 | player.ForceField:Destroy() |
14 | animation.AnimationId = "http://www.roblox.com/asset/?id=129967390" |
15 | animTrack = player.Humanoid:LoadAnimation(animation) |
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?
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