Attempt to index nil with 'reflect'

You can write your topic however you want, but you need to answer these questions:

  1. The reflect is there but it is still attempting to index nil with it but if I do WaitForChild it will do the same error with WaitForChild even though reflect is there as shown in the picture below

image

local Inq = Character:FindFirstChild("Inquisitor")
local reflect = Inq.reflect
1 Like

Did you read what I said about waitforchild? doesn’t work either

Can you show me where you define the player and the character?

show the part where you get the character because if WaitForChild also errors it means the ancestor of reflect isn’t loaded

(WaitForChild should yield if it’s reflect not loading, not error)

Define the player and the character like this:

local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local Character = plr.Character or plr.CharacterAdded:Wait()

Also, is this a local script or a server script?

i did this its a local script ik wha tim doing it’s just that part only it finds the model before going to the part to find which the part isn’t being founded

Redefine the player and the character as that, and it should work

thats how i have it lol as that

Can I see your script?
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤ

i fixed doing a value finding the player name then boom it worked

1 Like

Just incase someone have an issue like this do this the value is a string value

local name2 = script.Name2
name2.Value = Player.Name
local reflect = game.Workspace[name2.Value].Inquisitor:FindFirstChild("reflect")

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.