local type = script.Parent.Parent.Name type = type:sub(#type-1,#type) if type == "-uc" then type = "-c" end ID = game:GetService("ServerScriptService").DOL.LicenseSender:Invoke(type) if type:sub(1,1)==" " then type = type:sub(2,2) end for _,p in pairs (script.Parent:GetChildren()) do if p.Name == "Plate" then g = p:FindFirstChild(type) p.BrickColor = g.Color.Value g.Enabled = true g.ID.Text = ID for _,i in pairs (p:GetChildren()) do if i:IsA("SurfaceGui") and i.Name ~= type then i.Enabled = false end end end end
The Error, 22:25:20.815 - Workspace.Sports Car-PD.Body.License Plates:14: attempt to index global 'g' (a nil value) 22:25:20.817 - Stack Begin 22:25:20.819 - Script 'Workspace.Sports Car-PD.Body.License Plates', Line 14 22:25:20.820 - Stack End