It works in the studio but not in servers... The animations are mine and the local script is in StarterPack/Backpack. Also im using FilteringEnabled
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
local charge = 0
debounce = false
local Punchnum = 1
local Blastnum = 1
local BlastAnim = Instance.new("Animation")
local BlastAnim2 = Instance.new("Animation")
local StartingChargingAnim = Instance.new("Animation")
local HoldChargeAnim = Instance.new("Animation")
local PunchAnim = Instance.new("Animation")
local PunchAnim2 = Instance.new("Animation")
local KickAnim = Instance.new("Animation")
StartingChargingAnim.AnimationId = "http://www.roblox.com/Asset?ID=633268286"
HoldChargeAnim.AnimationId = "http://www.roblox.com/Asset?ID=633312531"
BlastAnim.AnimationId = "http://www.roblox.com/Asset?ID=633244897"
BlastAnim2.AnimationId = "http://www.roblox.com/Asset?ID=633247868"
PunchAnim.AnimationId = "http://www.roblox.com/Asset?ID=629944086"
PunchAnim2.AnimationId = "http://www.roblox.com/Asset?ID=629965827"
KickAnim.AnimationId = "http://www.roblox.com/Asset?ID=633423754"
Mouse.KeyDown:connect(function(key)
if not debounce then
debounce = true
if key == "e" then
print("Blast")
if Player.PlayerGui.Energy.Value >=5 then
Player.PlayerGui.Energy.Value = Player.PlayerGui.Energy.Value - 5
if Blastnum == 1 then
local animTrack = Player.Character.Humanoid:LoadAnimation(BlastAnim)
animTrack:Play()
Blastnum = 2
wait(0.4)
elseif Blastnum == 2 then
local animTrack = Player.Character.Humanoid:LoadAnimation(BlastAnim2)
animTrack:Play()
Blastnum = 1
wait(0.4)
end
end
elseif key == "q" then
print("Punch")
if Punchnum == 1 then
local animTrack = Player.Character.Humanoid:LoadAnimation(PunchAnim)
animTrack:Play()
Punchnum = 2
wait(0.5)
elseif Punchnum == 2 then
local animTrack = Player.Character.Humanoid:LoadAnimation(PunchAnim2)
animTrack:Play()
Punchnum = 3
wait(0.5)
elseif Punchnum == 3 then
local animTrack = Player.Character.Humanoid:LoadAnimation(KickAnim)
animTrack:Play()
Punchnum = 1
wait(0.3)
end
elseif key == "0" then
print("Charging")
local animTrack = Player.Character.Humanoid:LoadAnimation(StartingChargingAnim)
animTrack:Play()
charge = 1
Player.Character.Humanoid.JumpPower = 0
Player.Character.Humanoid.WalkSpeed = 0
wait(0.3)
Charge()
end
debounce = false
end
end)
Mouse.KeyUp:connect(function(key)
if key == "0" then
charge = 0
Player.Character.Humanoid.JumpPower = 50
Player.Character.Humanoid.WalkSpeed = 16
end
end)
function Charge()
while charge == 1 do
local animTrack = Player.Character.Humanoid:LoadAnimation(HoldChargeAnim)
animTrack:Play()
if Player.PlayerGui.Energy.Value < 100 then
Player.PlayerGui.Energy.Value = Player.PlayerGui.Energy.Value +1
elseif Player.PlayerGui.Energy.Value ==100 then
end
wait(0.05)
end
end

2 comments
Where do i put it tho
anywhere you are trying to load a instance