When I equip a certain tool, my studio crashes, I tried it with another tool, and it didn’t crash, but the tool that is making me crash, has a animation that plays when equipped,
Its a pushup Tool,
Heres The Script Inside The Tool.
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local a = char:WaitForChild("Humanoid")
local pushupR = a:LoadAnimation(script.Parent:WaitForChild("PushupReady"))
local pushupS = a:LoadAnimation(script.Parent:WaitForChild("PushupStay"))
local pushup = a:LoadAnimation(script.Parent:WaitForChild("Pushup"))
local number = 0
local push = true
local tool = script.Parent
tool.Equipped:Connect(function()
a.WalkSpeed = 0
pushupR:Play()
pushupS:Play()
end)
tool.Unequipped:Connect(function()
pushupS:Stop()
wait(0.2)
a.WalkSpeed = 16
end)
tool.Activated:Connect(function()
if push == true then
push = false
pushup:Play()
wait(1)
number = number + 1
push = true
end
end)
while true do
wait(0.1)
end
whoops, That was for a GUI that i was going to use, i changed my mind and deleted the GUI and everything in the script that has to do with it, except for that…