local InsertService = game:GetService("InsertService") script.Parent.MouseButton1Click:Connect(function() local ID = script.Parent.Parent.IdHolder.Text -- Get the id here local Model local success,err = pcall(function() Model = InsertService:LoadAsset(tonumber(ID)) -- Transforms text into a number end) if not success then -- If errors script.Parent.Parent.Display.Text = "Error Loading Map,Right Id?" script.Parent.Parent.Display.TextColor3 = 255, 0, 0-- ERROR LINE else -- If not errors local NewModel = Model:GetChildren()[1] NewModel.Parent = workspace Model:Destroy() script.Parent.Parent.Display.Text = "Sucsess" script.Parent.Parent.Display.TextColor3 = 85, 255, 0 -- ERROR LINE wait(3) script.Parent.Parent.Display.Text = "Output" script.Parent.Parent.Display.TextColor3 = (Color3)255 255, 255) -- ERROR LINE end end)
heh kinda forgot how to use color3 :/
local InsertService = game:GetService("InsertService") script.Parent.MouseButton1Click:Connect(function() local ID = script.Parent.Parent.IdHolder.Text -- Get the id here local Model local success,err = pcall(function() Model = InsertService:LoadAsset(tonumber(ID)) -- Transforms text into a number end) if not success then -- If errors script.Parent.Parent.Display.Text = "Error Loading Map,Right Id?" script.Parent.Parent.Display.TextColor3 = Color3.fromRGB(255, 0, 0)-- ERROR LINE else -- If not errors local NewModel = Model:GetChildren()[1] NewModel.Parent = workspace Model:Destroy() script.Parent.Parent.Display.Text = "Sucsess" script.Parent.Parent.Display.TextColor3 = Color3.fromRGB(85, 255, 0) -- ERROR LINE wait(3) script.Parent.Parent.Display.Text = "Output" script.Parent.Parent.Display.TextColor3 = Color3.fromRGB(255 255, 255) -- ERROR LINE end end)
You had to specify the color3 type, you have to put Color3.new after the = and in parentheses put the color code
local InsertService = game:GetService("InsertService") script.Parent.MouseButton1Click:Connect(function() local ID = script.Parent.Parent.IdHolder.Text -- Get the id here local Model local success,err = pcall(function() Model = InsertService:LoadAsset(tonumber(ID)) -- Transforms text into a number end) if not success then -- If errors script.Parent.Parent.Display.Text = "Error Loading Map,Right Id?" script.Parent.Parent.Display.TextColor3 = Color3.new(255, 0, 0)-- ERROR LINE else -- If not errors local NewModel = Model:GetChildren()[1] NewModel.Parent = workspace Model:Destroy() script.Parent.Parent.Display.Text = "Sucsess" script.Parent.Parent.Display.TextColor3 = Color3.new(85, 255, 0) -- ERROR LINE wait(3) script.Parent.Parent.Display.Text = "Output" script.Parent.Parent.Display.TextColor3 = Color3.new(255 255, 255) -- ERROR LINE end end)
not sure if new is capitalized