i get this error: Script:8: attempt to index field 'Parent' (a nil value)
local id = game.Workspace.Inmate:GetChildren() local spawn = game.Workspace.InSpawns:GetChildren() local player = script.Parent.Parent.Parent.Parent.Parent function OnClicked() for d = 1, #id do if id[d].Value == "None" then script.Parent.Parent.Parent.Parent.UI.Id.Value = id[d].Name id[d].Value = player.Name script.Parent.Parent.Parent.Parent.UI.Team.Value = "Inmate" for u = 1, #spawn do if spawn["Spawn"..u] then local spwn = spawn["Spawn"..u] player.Character.Torso.CFrame = CFrame.new(spwn[u].Position.x, spwn[u].Position.y + 3, spwn[u].Position.z) end end local ui = script.Parent.Parent.Parent.Parent.UI:GetChildren() for o = 1,#ui do if ui[o].ClassName == "Frame" then script.Parent.Parent.Parent.Parent.UI.Character.Visible = false script.Parent.Parent.Parent.Parent.UI.Crafting.Visible = false ui[o].Visible = true end end script.Parent.Parent.Parent:remove() else script.Parent.Parent.Full.In.Visible = true wait(3) script.Parent.Parent.Full.In.Visible = false end end end script.Parent.MouseButton1Click:connect(OnClicked)