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

Attempt to index nil with 'Parent'?

Asked by 3 years ago

I'm using a script in a gui to grab a dog from Replicated Storage and add it to workspace. Keep getting Attempt to index nil with 'Parent'

Script:

script.Parent.MouseButton1Click:Connect(function()
    local player = script.Parent.Parent.Parent.Parent.Parent.Character
    local rs = game:GetService("ReplicatedStorage")
    rs.Doge:Clone().Parent = game.Workspace.Dogs
end)
0
Can you point out what line it is or just give me the whole error message. MarkedTomato 810 — 3y

Answer this question