sending the code with a button on the client end, tracking what the code text is for the textbox, for some reason the code is the exact same and still comes back wrong
MODULE
queuelib.Lobbycode = {
}
function queuelib.CreateCard(plr, status, cardname, card)
card.Parent = plr.PlayerGui["Queue System"].MainFrame.ScrollingFrame
card.LobbyName.Text = cardname
if status == 1 then
card.Status.Text = "locked"
local lobbycode = 0
local randomnumber = math.random(1000,9999)
lobbycode = randomnumber
table.insert(queuelib.Lobbycode,lobbycode)
print(queuelib.Lobbycode)
elseif status == 0 then
card.Status.Text = "unlocked"
end
end
function queuelib.CheckCode(code)
print(code)
if table.find(queuelib.Lobbycode, code) then
print("we did it")
else
print("wrong code")
end
end
ah, its being sent through a textbox from the client end, so its probably being sent as a string, but it prints out as a number oddly enough, thats probably my issue, let me test that
While printing Roblox converts numbers to strings so ye… Also, its better to send the string through the RE and then convert it to number in the server side because numbers have bigger byte overheads
ah yep, that would be my problem, thank you LOL i was like it looks the exact same why is it being weird with me LOL, we got it though, ill mark u as the solution, tyvm