So this is my script:
local player = game.Players.LocalPlayer
local tokens = player.leaderstats.Tokens
script.Parent.MouseButton1Click:Connect(function()
if tonumber(script.Parent.Text) > game.ReplicatedStorage.CurrentBid.Value or game.ReplicatedStorage.CurrentBid.Value == nil then
if tonumber(script.Parent.Text) <= tokens.Value then
game.ReplicatedStorage.NewBid:FireServer(tonumber(script.Parent.Text))
end
end
end)
For some reason i get the error "attempt to compare number with < nil" which is really odd. I have done some investigating and it seems as if when you enter text into the text box and press enter, it doesnt register in the "Text" property of the textbox.
Help appreciated.

2 comments
is this error on line 5 or 6
the error no longer happens, but it just doesnt work