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

Struggling in many hours and can't figure it out? :(

Asked by
korj5 0
9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
01local type = script.Parent.Parent.Name
02type = type:sub(#type-1,#type)
03 
04if type == "-uc" then
05    type = "-c"
06end
07ID = game:GetService("ServerScriptService").DOL.LicenseSender:Invoke(type)
08if type:sub(1,1)==" " then
09    type = type:sub(2,2)
10end
11for _,p in pairs (script.Parent:GetChildren()) do
12    if p.Name == "Plate" then
13        g = p:FindFirstChild(type)
14        p.BrickColor = g.Color.Value
15        g.Enabled = true
View all 23 lines...

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

0
What are you trying to accomplish here? What you do you expect `type` to be when you get to line 12? BlueTaslem 18071 — 9y

Answer this question