#Attempt to index Nil with 'FindFirstChild'

1 messages · Page 1 of 1 (latest)

frail roost
#

So I'm trying to make code that will make a part point towards the cursor, and during this i ended up messing with remote events since i needed those to port over info on where the mouse is. The issue is i also want to port over the HumanoidRootPart of the player and it keeps coming up with this error message. I can't figure out what the problem is
I searched it and i know that the error message is about it indexing something that doesn't exist but it DOES exist so i'm confused
Anyone able to help?
(I started scripting yesterday so i expect this to be a really stupid mistake)

rare drumBOT
#

studio** You are now Level 1! **studio

frail roost
#

coolio

oblique latch
#

use waitforchild instead

#

i guess

frail roost
oblique latch
#

wait for the character to spawn before doing that then

#

i guess

safe spruce
frail roost
balmy cove
#

local c = plr.Character or plr.CharacterAdded:Wait()

if there is you just get it, if not, you'll wait for the signal

shrewd umbra
#
local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local HumanoidRootPart = character:WaitForChild("HumanoidRootPart")
frail roost
#

ty

frail roost
shrewd umbra
#

goated

#

we all make silly errors

frail roost
#

as i thought this code is not what i'm supposed to be doing

#

icl i suck at scripting 💔

shrewd umbra
#

dw bro keep practicing

#

have to make errors to learn from them

frail roost
#

true

#

it's just like this is WAY too complicated, like overly so

shrewd umbra
#

whatcha making?

cosmic wren
#

use waitforchild