So I'm trying to make a Stand from JoJo's Bizarre Adventure, right? I was trying to make the positions when it printed an error in the output menu. I tried to fix it by selecting other parts, if that's even the correct way to fix it. I'm kind of new to scripting, so I still need to watch some tutorials. Here's my code so far:
17 local plr = game.Players.LocalPlayer 18 local chr = plr.Character 19 20 plr:GetMouse().KeyDown:connect(function(key) 21 if key == "q" then 22 local Stand = game.Lighting.Stando:Clone() 23 Stand.Parent = chr 24 Stand.HumanoidRootPart.Position = Stand.HumanoidRootPart.CFrame == CFrame.new(chr.HumanoidRootPart.Position - Vector3.new(2,0,0) + Vector3.new(0,.8,3)) 25 end 26 end)
The line that the output claims to be wrong is line 24. This is the error message: Players.YoureTotallyScrewed.Backpack.Keybind:24: attempt to index nil with 'HumanoidRootPart' (Keybind is the name of the script)
Please respond, and thank you for reading.