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

Why is the call on character not working? Works in studio.

Asked by 7 years ago
Edited 7 years ago

Error: https://gyazo.com/a7ff2d4e964399d807b57e841779423b This script is in a tool that's inside a players backpack which is inside the player Here's the code.

001local tool = script.Parent
002local player = game:GetService("Players").LocalPlayer
003--local humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
004local clickDetecter1 = Instance.new("ClickDetector")
005local clickDetecter2 = Instance.new("ClickDetector")
006local clickDetecter3 = Instance.new("ClickDetector")
007local clickDetecter4 = Instance.new("ClickDetector")
008local clickDetecter5 = Instance.new("ClickDetector")
009print(script.Parent.Parent.Parent.Character.Humanoid)
010local humanoid = script.Parent.Parent.Parent.Character.Humanoid
011local var = 0
012local d = humanoid.Parent:GetChildren()
013local e = game.ReplicatedStorage:GetChildren()
014--local leftArm = script.Parent.Parent:FindFirstChild("Left Arm")
015--local rightArm = script.Parent.Parent:FindFirstChild("Right Arm")
View all 137 lines...

1 answer

Log in to vote
0
Answered by 7 years ago

Calling the character doing

1script.Parent.Parent.Parent.Character

is unwise a recommended way would simply be:

1local player = game:GetService("Players").LocalPlayer
2local char = player.Character
3local human = char:WaitForChild('Humanoid')

maybe add a wait(.25) in the front iddkdkdkdk

hope this helped :/

Ad

Answer this question