Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Attempt to index nil with clone data error?

ayo i got an error attempt to index nil with 'clone' , let me show you the script


local serv = game:GetService("ServerStorage")


game:GetService("ReplicatedStorage").checking.OnServerEvent:Connect(function(plr,trueorfalse)
	if trueorfalse == false then
	elseif trueorfalse == true then
		wait()
		local server =	serv.StandScripts:FindFirstChild(plr.Data.StandName.Value):Clone()
			server.Parent = plr.Backpack

	end
end)

below here are my explorer

https://gyazo.com/6024693ae7f22649d19fb89020753922 https://gyazo.com/5735fcae644ae60585c402b736fdc625

2 comments

0

Thats beacuse you tried to clone a value

0

You can only clone actual objects like tools and parts

1 answer

Instead of "serv.StandScripts:FindFirstChild(plr.Data.StandName.Value):Clone()", you should remove the .Value at the end. You can only clone instances, not values themselves.

This discussion is preserved as it was. New answers, comments, and votes are closed.