Basically ive been working on this for a day and a half, and I continue to get error after error, this is my first time working with a dynamic GUI so I'm probably doing something really stupid. (yes, my code is really messy)

local Tool = script.Parent 
local CF = Tool:WaitForChild("CurrentFuel")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local GUI = Tool.LighterGUI
local TotalFuel = GUI.FuelLeft

print(TotalFuel.Size.X)
print(Vector2.new(0,Tool["FuelLoss%"]))

local Number = TotalFuel.Size.X * Vector2.new(0,Tool["FuelLoss%"])
local SecondNum = 100 
local FuelDecreaseNum = Number / SecondNum

CF.Changed:Connect(function()
	local CurrentFuel = CF.Value
	local FuelLeft = GUI.FuelLeft.Size 
	local TotalFuel
	
	FuelLeft.Size = Vector2.new(FuelLeft.X - 10, FuelLeft.Y)
	
end)

To clarify, I've gotten a single error with this current code, but a few different times I've tried to reinventing this code I've gotten other errors, any help would be great.

2 comments

0

TotalFuel.Size.X * Tool["FuelLoss%]. The arithmetic you used has contending datatypes.

0

Im not sure, because when I print them out TotalFuel.Size.X prints "0, 207", and the other one prints "0,0".