Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Attempt to index nil with clone data error?

Asked by 3 years ago
Edited 3 years ago

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

0
Thats beacuse you tried to clone a value sne_123456 439 — 3y
0
You can only clone actual objects like tools and parts sne_123456 439 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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.

Ad

Answer this question