Hello, Friends! Would you help me please? "attempt to index nil with 'Clone'"

local v2 = v1.chosenPlayerValue.Value
local v3 = v1.chosenItemValue.Value

ItemSelect works successfully, but with server run context it keeps giving me:

1 Like

Have you made sure that v3.Value exists? try going on server-side testing and see if it exists.

You cant FindFirstChild on the Value of a Value. You would have to find the child of just v2 instead of v2.Value. Do FindFirstChild(v2).Value

That make sense, i will try it

Do you meant this?

It keeps giving attempt to index nil with 'Clone'
Im wondering that this is because its not finds value in chosenplayervalue/chosenitemvalue, but value in there.

In that script do print(game:GetService("ServerStorage"))


Sorry, do print(game:GetService("ServerStorage"):GetDescendants())

There are about 450 names so,that i found about arrows/rokakas

Can you share the place file so I can figure it out?

Im not really good at scripting/making games, but trying to get better
Place file:
Also bind for give gui is L

local v1 = script.Parent.Parent.ItemTab
local bu = v1.giveButton
local v2 = v1:FindFirstChild("chosenPlayerValue")
local v3 = v1:FindFirstChild("chosenItemValue")

	local gV2 = game.Players:FindFirstChild(v2)
	local gV3 = game:GetService("ServerStorage"):WaitForChild("Items"):FindFirstChild(v3)
	local g = gV3:Clone()
	g.Parent = gV2.Backpack

I dont think thats it?

Print out v2 and v3 before gv2 and gv3 in the mousebuttonclick function. And add back the .Value after v2 and v3.

No need for a full game, i highly recommend you edit it out since the person already has it now.
Well anyways just do what i did: Have you made sure that v3.Value exists? try going on server-side testing and see if it exists.

I have tried that out earlier, it will show " "

Then the values are nil. Your trying to find a player with no value. You need to set the Values first.

thats it, same with item.