I’m having trouble creating a custom gauge for my vehicle, The numbers on the speedo are not in the right position. Wondering if someone could help me out
Here’s the part of the script i think is causing the issue
local v11 = Instance.new("Frame", script.Parent.Speedo)
v11.Name = "lns"
v11.BackgroundTransparency = 1
v11.BorderSizePixel = 0
v11.Size = UDim2.new(0, 0, 0, 0)
for v12 = 1, 90 do
local v13 = script.Parent.ln:clone()
v13.Parent = v11
v13.Rotation = 45 + 225 * (v12 / 90) + 23.75
if v12 % 2 == 0 then
v13.Frame.Size = UDim2.new(0, 2, 0, 10)
v13.Frame.Position = UDim2.new(0, -1, 0, 100)
else
v13.Frame.Size = UDim2.new(0, 3, 0, 5)
end
v13.Num:Destroy()
v13.Visible = true;
end
for i, v in pairs(v1) do
local lnn = Instance.new("Frame",script.Parent.Speedo)
lnn.BackgroundTransparency = 1
lnn.BorderSizePixel = 1
lnn.Size = UDim2.new(0,0,0,0)
lnn.Name = v.units
if i~= 1 then lnn.Visible=false end
for i = 0, v.maxSpeed, v.spInc do
local ln = script.Parent.ln:clone()
ln.Parent = lnn
ln.Rotation = 45 + 225 * (i / v.maxSpeed)
ln.Num.Text = i
ln.Num.TextSize = 14
ln.Num.Rotation = -ln.Rotation
ln.Frame:Destroy()
ln.Num.Visible = true
ln.Visible = true
end
end