#[SOLVED] Attempt to index nil with 'Clone'

35 messages · Page 1 of 1 (latest)

sweet swallow
#

"Item" is nil, meaning it doesnt exist

#
local item = game.ReplicatedStorage.Guns:FindFirstChild(plr.Storage:FindFirstChild(script.Parent.Name).Value)

also what is this line of code supposed to do

#

Could you send a picture of what it looks like in the explorer?

spice monolith
#

if not game:IsLoaded() then
game.Loaded:Wait()
end

sweet swallow
spice monolith
sweet swallow
#

is it the repeat until?

#

Could I get a picture of how it looks in the explorer?

spice monolith
#

Repeating anything for a long time can cause lag, in short

sweet swallow
#

but nonetheless I dont think that's the error

spice monolith
#

The error is in the item variable

#

You are copying a value, not an instance

sweet swallow
spice monolith
#

Just remove .Value

sweet swallow
#

??

graceful sigilBOT
#

studio** You are now Level 4! **studio

sweet swallow
#

Im confused

#

what was it

#

error?

#

Could you send me what the item looks like in the explorer?

#

I see

#

Like Alejandro said

#

Wait

#

let me write it

#
local item = game.ReplicatedStorage.Guns:WaitForChild(plr.Storage:FindFirstChild(script.Parent.Name.Value)
#

quick question

#

Script.Parent.Name.Value

#

what is it?

#

Okay

#

So Name is a string value?

#

Maybe the problem is the way you're calling it

#

maybe the value itself doesnt exist yet or maybe there's a problem with how it's named

#

could you send a picture like the Player one but of the script and it's children?