local UIS = game:GetService(“UserInputService”)
local Rep = game:GetService(“ReplicatedStorage”)
local Remote = Rep:WaitForChild(“FireBall”)
local Plr = game:GetService(“Players”).LocalPlayer
local Mouse = Plr:GetMouse()
local debounce = false
UIS.InputBegan:Connect(function(input,gameproc)
if not gameproc then
if input.KeyCode == Enum.KeyCode.Q then
local Anim = Plr.Character.Humanoid:LoadAnimation(script.Animation)
Anim:Play()
delay(.8,function()
Remote:FireServer(Mouse.Hit.p)
Anim:Stop()
end)
if not debounce then
debounce = true
end
end
end
local UIS = game:GetService(“UserInputService”)
local Rep = game:GetService(“ReplicatedStorage”)
local Remote = Rep:WaitForChild(“FireBall”)
local Plr = game:GetService(“Players”).LocalPlayer
local Mouse = Plr:GetMouse()
local debounce = false
UIS.InputBegan:Connect(function(input,gameproc)
if not gameproc then
if input.KeyCode == Enum.KeyCode.Q then
if not debounce then
debounce = true
local Anim = Plr.Character.Humanoid:LoadAnimation(script.Animation)
Anim:Play()
delay(.8,function()
Remote:FireServer(Mouse.Hit.p)
Anim:Stop()
end)
end
end
end
end)
Remote.OnClientEvent:Connect(function()
wait(10)
debounce = false
end)