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

Server-side testing is? I edited, thanks for you noticing me.

Sorry I can’t help any more as I’m not sure. I’m pretty sure it’s something simple.

On testing tab you see Current Client, click on it and you’ll get redirected to server-view instead, during that, check serverstorage and see if v3 exists.

Its ok, i think this very simple, i wondering that script couldnt find value in string value.

On the mean time, you can use this solution right here, since i presume you’re trying to clone the VALUE of a STRINGVALUE of which this solution matches your problem.

You could also use print(v3.Value) and see if it works.

I trying to clone Item with class Tool, with name of STRINGVALUE.VALUE, also in server-side testing value of Player Name in string value, as like Item Name too doesn’t exist, like i mean value in string value exists only in client, but not in server. Why is that value doesnt exist in server

What i’m trying to get here is you’re trying to detect if a stringvalue matches with the tool name and if it does clone to player backpack?

Yes, i trying to detect if stringvalue matches with the tool name and it clones into player backpack. You got it right

You can just use string manipulation
string. Alternatively, you can also use a table that contains all of tool names and use table.find to detect if it matches the string.

Never knew about string manipulation, can you show me an example? Am i needed to use string.find?

table.find can help you out.

One more thing have you tried this?

local gV3 = game.ServerStorage:WaitForChild("Items"):WaitForChild("v3")

	local g = gV3.Value:Clone()
	g.Parent = gV2.Backpack

PS: Mark my post as solution (solved) if this helps you out!

Friend, i was thinking, why is value is not appearing on server, but appearing on client, and i think that because i used localscript for item choose button/player choose button, do you think that if i will change localscript to script?

Yes that is probably due to the client creating the value and not replicating, you should try making the value server-sided instead of client-sided.

1 Like

I tried and that worked! Thank you very well for suggesting idea with server-side testing, when i remembered abt it i wondered, now i tried to join game, chosen player and item, switched to server and seen that it worked, that was very simple, but it was me dumb🤔

Nothing to worry about, I also make these small mistakes and later on realize it was a simple solution