I've been working on a piggy game, and then my game broke and this error while playing with fan: attempt to index nil with 'Name'? please help me!
Thanks!
function module.DressPiggy(noob)
local character
if noob.EquippedSkin.Value ~= "" then
if game.ReplicatedStorage.Skins:FindFirstChild(noob.EquippedSkin.Value) then
character = game.ReplicatedStorage.Skins[noob.EquippedSkin.Value]:Clone()
end
else
character = game.ReplicatedStorage.Skins.Noob:Clone()
end
character.Name = noob.Name
noob.Character = character
character.Parent = workspace
end

7 comments
What line is this error on?
line 11 please help me
What is "noob"? What is it, like a value, model, etc.
To add on, what is "character" aswell?
it's a model/skin for the noob
can u tell what the error is?
it probably means this returned nil game.ReplicatedStorage.Skins:FindFirstChild(noob.EquippedSkin.Value)