You can write your topic however you want, but you need to answer these questions:
-
My friend gave me his tuck script to fix it cause the animation would also play if the animation isn’t equipped
-
The animation plays when the player doesn’t have the tool equipped
-
I don’t have any solutions currently
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The problem:
The code:
local Character = player.Character or player.CharacterAdded:Wait()
local hum = player.Character:WaitForChild("Humanoid")
local KeyPressed = Enum.KeyCode.Q
local UIS = game:GetService("UserInputService")
local tuckanim = hum:LoadAnimation(script:WaitForChild("Tuck"))
local bar = script.Parent.LocalScript.BallGui.Power.PowerFrame.BarBackup.Bar
local values = script.Parent.Tuck
player.Character:FindFirstChild("Football")
UIS.InputBegan:Connect(function(Input, gameProcessedEvent)
if Input.KeyCode == KeyPressed then
values.Value = true
else
values.Value = false
end
end)
values.Changed:Connect(function()
if values.Value == true then
bar.ImageColor3 = Color3.new(0, 255, 0)
else
bar.ImageColor3 = Color3.new(195,0,0)
end
end) ```