Back to nothing. doesnt work, no output message.
This is so annoying bruh
Code:
local animID = 'rbxassetid://16232852979'
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Humanoid = player.CharacterAdded:Wait():FindFirstChild("Humanoid")
local activated = false
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = animID
local AnimationTrack = Humanoid:LoadAnimation(animation)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
activated = not activated
print(activated)
if activated then AnimationTrack:Play() else AnimationTrack:Stop() end
end
end)
local animID = 'rbxassetid://16232852979'
local Humanoid = script.Parent:FindFirstChild("Humanoid")
if Humanoid then
local activated = false
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = animID
local AnimationTrack = Humanoid:LoadAnimation(animation)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
activated = not activated
print(activated)
if activated then AnimationTrack:Play() else AnimationTrack:Stop() end
end
end)
end
wait(1)
local animID = 'rbxassetid://16066342156'
local Humanoid = script.Parent:FindFirstChild("Humanoid")
if Humanoid then
local activated = false
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = animID
local AnimationTrack = Humanoid:LoadAnimation(animation)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
activated = not activated
print(activated)
if activated then AnimationTrack:Play() else AnimationTrack:Stop() end
end
end)
end
None. Not a single error, it just does nothing.
And when we did print(“click”) after the InputBegan function that didnt work either for some reason until i tried it in an alternate game where it did indeed print (“clicked”) but it still didnt wanna run the animation.
You need to set up a test plan for your game, do an erroneous, extreme and normal test each to determine whether the problem is studio related or a problem with your script.
Since the specificity of the problem is objectively on you, we can’t really do much but advise you to test everything properly as it’s a very isolated issue and as @ExercitusMortem said, he already tried it out himself.
I would highly recommend decomposition to test the integrity of your game as it seems like a very foundational problem.