My friend gave me this script to put inside StarterGui
local ConsiderForceField=true local Enabled=true local Player = game.Players.LocalPlayer
mouse = Player:GetMouse() function onKeyDown(key) Key = key:lower() if key == "z" then if Enabled==false then return end Enabled=false
Animations = script.Animz AnimKey = Animations.Animation1 keyframesReached = 0 local animTrack = Player.Character.Humanoid:LoadAnimation(AnimKey) animTrack.KeyframeReached:connect(function(keyframeName) keyframesReached = keyframesReached + 1
end) animTrack:Play() wait(0.8) animTrack:Stop() Enabled=false end end mouse.KeyDown:connect(onKeyDown)
then inside that a model called animz and inside that an animation1.
So how can i make so that you can press the button to make it end?