I'm trying to make a Stand from JJBA, and I got an error that I don't know how to fix. Help?
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:
01 | 17 local plr = game.Players.LocalPlayer |
02 | 18 local chr = plr.Character |
04 | 20 plr:GetMouse().KeyDown:connect( function (key) |
06 | 22 local Stand = game.Lighting.Stando:Clone() |
08 | 24 Stand.HumanoidRootPart.Position = Stand.HumanoidRootPart.CFrame = = CFrame.new(chr.HumanoidRootPart.Position - Vector 3. new( 2 , 0 , 0 ) + Vector 3. new( 0 ,. 8 , 3 )) |
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.