Should this code be a LocalScript and be placed into StarterGui?
local player = game.Players.LocalPlayer
local character = player.Character
local rep = game:GetService("ReplicatedStorage")
local uis = game:GetService("UserInputService")
local jumpshot = rep.Animations:WaitForChild("jumpshot animation")
local jumpshotanimation = character.Humanoid:LoadAnimation(jumpshot)
local shoot = rep.Events:WaitForChild("shoot")
local Basketball = game.ServerStorage.PracticeBall
local ShotBall = false
local Debounce = false
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E and not Debounce and not ShotBall and
character.Humanoid:FindFirstChild(Basketball) then
ShotBall = true
Debounce = false
jumpshotanimation:Play()
wait()
Debounce = false
ShotBall = false
shoot:FireServer()
end
end)

1 comment
I'm still accepting answers! D: