output:20:08:16.118 - Workspace.Script:24: attempt to index a nil value 20:08:16.118 - Stack Begin 20:08:16.119 - Script 'Workspace.Script', Line 24 20:08:16.120 - Stack End
function setMessageVisibility(objects, visible) for _, object in pairs(objects) do object.Visible = visible end end game.Players.PlayerAdded:connect(function(player) local pack = Instance.new("Model",game.Lighting) local holder = game.Lighting.holder holder:clone().Parent = pack local clothes = game.Lighting.clothes clothes:clone().Parent = pack local faces = game.Lighting.faces faces:clone().Parent = pack local inventory = game.Lighting.inventory inventory:clone().Parent = pack pack.Name = player.Name.."sPack" script.Parent.check.Value = 0 if player.Name == "Player" then game.ServerStorage:findFirstChild(game.ServerStorage.GM, true):GetChildren():Clone().Parent = game.Lighting.player.Name.."sPack"..inventory end end)
Well to start, your first argument for FindFirstChild
is incorrect. You already told it to look for this in ServerStorage so telling it again actually is telling it to find game.ServerStorage.game.ServerStorage (which doesn't exist) Also, try simplifying this script. EXAMPLE
if player.Name == "Player" then Argue = game.ServerStorage:FindFirstChild("GM") --I have no clue what the "true" is for, please let me know if I need it. Children = Argue:GetChildren() Thing = Children:Clone() Thing.Parent = game.Lighting.player.Name --IDK what you did, but including [.."sPack"..] is also going to break this.
A lot of things in your script are inefficient and incorrect. My answer probably won't fix the script, but it will get you closer. When you finish fixing what I have given you, please edit your question for further review.
If I helped, please accept my answer
If there are any bugs, let me know and I will correct them if I can
THANKS!
Locked by BlueTaslem
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?