hi, I am making a football, but I have a problem.
the issue is that i keep getting "i am awesome and cool and handsome and the best" over and over again, although i am supposed to stop getting that when the tool is equipped. this is because equip boolean is not changing to true!
i can tell by that i don't get "animation folder" (line 24) in output.
the local script is in tool in starterpack, but tool's parent switch to the player's character when equipped.
[issue is on line 14]
[there is no error]
script:
---shortcuts
local football = script.Parent
local anim = football:WaitForChild("football anim")
local experience = game.Workspace
local equip = football.equip.Value
local force = football.VectorForce
local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()
---know when footbal is selected
function eqeqeqeeqqioipip(mouse) --doctor i am fine ahahhahfbahfhabfahbfahfbahfb
local equip = true
print(equip.Value)
end
---find animation folder
repeat
wait(1)
print("i am awsome and cool and handsome and the best")
until equip == true
if football.Parent.anim_folder == not nil then
local anim_folder = football.Parent.anim_folder
print(anim_folder.Name)
elseif football.Parent.animation_folder == not nil then
local anim_folder = football.Parent.animation_folder
print(anim_folder.Name)
elseif football.Parent.AnimationFolder == not nil then
local anim_folder = football.Parent.AnimationFolder
print(anim_folder.Name)
elseif football.Parent.animationFolder == not nil then
local anim_folder = football.Parent.animationFolder
print(anim_folder.Name)
elseif football.Parent.animationfolder == not nil then
local anim_folder = football.Parent.animationfolder
print(anim_folder.Name)
---if there is none, make a new one
else
local anim_folder = Instance.new("Folder", football.Parent)
anim_folder.name = "animation folder"
anim_folder:SetAttribute("info", "this folder was made by a script in some tools made by jerem_qpmfpi")
print(anim_folder.name)
end
---move animation to character
anim.parent = anim_folder
local anim = anim_folder:WaitForChild("football anim")
---football_used funtion
function football_used()
---play animation
anim:Play()
---wait a bit
wait(0.7)
---detach football from player
football.Parent = experience --so roblox doesn't shoot me
---throw football
force.Force = Vector3.new(100, 0, 0)
wait(1)
---delete it all
anim:Destroy()
football:Destroy()
end
---triggers
football.Activated:Connect(football_used)
football.Equipped:Connect(eqeqeqeeqqioipip)

1 comment
bruh, i realized the error was actually on line 21 lol