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

attempt to index field 'DriveSeat' (a nil value) HELP NEEDED ASAP?

Asked by 6 years ago

Im trying to make the fuel value appear on screen so the player can see how many liters they have.

while wait(3) do
    local player = game.Players.LocalPlayer
print("GOT THE NAME")
    local GoKart = player.name .. "'s GoKart"
print(GoKart)
    local Fuel = GoKart.DriveSeat.Fuel.Value
    script.Parent.Liters.Text = tostring(Fuel).."L"
end

Players.aleandroblingo.PlayerGui.Screen.Interface.Fule6: attempt to index field 'DriveSeat' (a nil value)22:21:13.55

0
I don't know what you're trying to do. You're indexing a string like it's an instance. OldPalHappy 1477 — 6y
0
Yea, Someone told me but i dno what to do. aleandroblingo -35 — 6y

Answer this question