Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I cant make this gui find the value of fuel in side the seat?

while wait(3) do local Fuel = script.Parent.Parent.Parent.Fuel.Value script.Parent.Litres.Text = "" .. tostring(Fuel) end

1 comment

0

use code blocks

1 answer

What you did is setting Fuel as the Int/NumberValue's value. You cannot do that in roblox lua. You must only define the object and get the value when needed. In the example you can see that I set the text to the fuels value converted into a string.

while wait(3) do 
	local Fuel = script.Parent.Parent.Parent.Fuel
	script.Parent.Litres.Text = tostring(Fuel.Value) --.." L" if you need
end

Accept if this helped

1 comment

0

It still doesent work, it comes up with "08:02:05.216 - Fuel is not a valid member of PlayerGui" on output

This discussion is preserved as it was. New answers, comments, and votes are closed.