Do you know where the Error is produced?
I think it’s from the animate script in the Character.
If yes then could you provide the script too?
1- no
2- I don’t know which script is causing this error
Do you have a script that tryes to load or play an animation?
I have this
local function playAnimationFromServer(character, animation)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
local animator = humanoid:FindFirstChildOfClass("Animator")
if animator then
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
return animationTrack
end
end
end
playAnimationFromServer(Char, script.Parent.Animation)
stopped showing the error, if it come back what do I do?
Is there a message before that error? because the script of you shouldn’t produce it.
never mind the error came back
I have a script that disables the controls then this error occurs
Mk, can you show it?
Would be helpful
Can I show only the part that the script disables the controls?
Sure. of course you can.
… … .
in StarterCharacterScripts (LocalScript)
local uis = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Char = plr.Character or plr.CharacterAdded:Wait()
local Humanoid = Char:WaitForChild("Humanoid")
local mouse = game.Players.LocalPlayer:GetMouse()
local coolDown = true
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PoderStun = ReplicatedStorage:WaitForChild("PoderStun")
uis.InputBegan:Connect(function(key, chat)
if chat then return end
if key.KeyCode == Enum.KeyCode.F and coolDown and not PoderStun.Value then
coolDown = false
PoderStun.Value = true
print(coolDown)
local Controls = require(game.Players.LocalPlayer.PlayerScripts.PlayerModule):GetControls()
Controls:Disable()
local function playAnimationFromServer(character, animation)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
local animator = humanoid:FindFirstChildOfClass("Animator")
if animator then
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
return animationTrack
end
end
end
playAnimationFromServer(Char, script.ScriptL.Pular)
script.LightBombCriarPoderEvent:FireServer()
wait(6.10)
Controls:Enable()
PoderStun.Value = false
local cooldown = 60
while wait(1) do
print(cooldown)
print(coolDown)
if cooldown == 0 then
coolDown = true
break
else
cooldown = cooldown - 1
end
end
end
end)
@Arka171003 I’ll show you everything I think it will be easier for you to help me
What I think happened is that an animation tried to play when the character was already dead or something
I don’t think it can be that, but if it is, would there be a solution for me?
The error says that it needs a humanoid to play the animation. So make sure that there is a humanoid inside of the object you’re trying to play an animation on
I don’t know how to do that, what is that object?
Does the error actually interfere with what you are trying to achieve? Because you seem to fairly clueless as to what I’m talking about.
I don’t understand what you mean, it doesn’t interfere I think …
It’s probably just an error inside of the core animate script made by roblox. It shouldn’t cause any harm.
If you really wanna know where the error happened, you can just click the error when in test mode and it’ll bring you to the exact line.