Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

humanoid to be a descendant to the game object?

Asked by 3 years ago
local TM = require(script.Parent.Parent:WaitForChild("ToolManagment"))
tool = script.Parent
player = game.Players.LocalPlayer
InputService = game:GetService("UserInputService")
ReplicatedStorage = game:GetService("ReplicatedStorage")
Debris = game:GetService("Debris")
Kick = false
Equipped = false
Usage = true

repeat wait() until player.Character:FindFirstChild("Humanoid")

local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://4055996954"
local PlayAnim = player.Character.Humanoid:LoadAnimation(Anim)

when respawning or when you refresh yourself really fast. It breaks the tool. Anyone can help??

what it says in dev console - humanoid to be a descendant to the game object

0
the error means that the humanoid is not a descendant/is in the game object which it needs to be to work or it will error IEntity_303I 80 — 3y
0
ive never countered this before , who ever give me the answer to it will need to explain how and what arclyzt 5 — 3y
0
Tools get added before your character is in the world, you can try yielding until character's parent will not be changed to game or until it's not descendant of it. imKirda 4491 — 3y
0
I got the fix to it for me. i just added local Character = game.Workspace:WaitForChild(game.Players.LocalPlayer.Name) local Humanoid = Character:WaitForChild("Humanoid") arclyzt 5 — 3y

Answer this question