I am trying to make a toggle animation button. After editing the code for a bit I got the enclosed error. I have been trying to fix it for over 30 minutes but nothing works!! Any reason why?
local userInputService = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local char = plr.Character
local name = plr.Name
local summon = true
local Anim = game.Workspace.TheWorldTotality.TWT_PlrPose
local AnimTwo = game.Workspace.TheWorldTotality.TWT_PoseAnim
local stand = game.Workspace:FindFirstChild("TWT")
local loadAnimTwo = char.Humanoid:LoadAnimation(Anim)
local loadAnimOne = stand.Humanoid:LoadAnimation(AnimTwo)
if name == ("Crimsonknightzone") then
print("Welcome Creator")
userInputService.InputBegan:Connect(function(input,gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.G then
if loadAnimOne.IsPlaying== false and loadAnimTwo.IsPlaying == false then
game.ReplicatedStorage.TWTevents.Pose:FireServer()
loadAnimOne:Play()
loadAnimTwo:Play()
end
else
loadAnimOne:Stop()
loadAnimTwo:Stop()
end
end
end)
end

4 comments
you kinda didnt put everything in a code block...
Yeah, i can't help you if I can't put everything in the codeblock. Please code block it.
Got it
Everything is in the code block