Hello,
So I am currently coding a register for a group where you can put the player username in and then it will open a UI for u to put in there order. For some reason it will not let me choose the user and when I write the username in and press the button it will not open the UI and says that the user alreday has an order (this is done by an else statment). I am not sure why cuz I know they don’t have a order out.
For some reason if I am to put my username in it will open the UI and work but not if I do someone elses username!
It was working before after I fixed it due to another dev codeing it but not finishing it but some how I messed it up.
Small part of code (not full due to the script being massive)
UsernameFrame.Select.MouseButton1Click:Connect(function()
print("SECTION RUN")
local UsernameToFind = UsernameFrame.TypeHere.Text
print(UsernameToFind)
if UsernameToFind ~= nil then
print("SECTION RUN")
for i,plr in pairs(game.Players:GetChildren()) do
if plr.Name ~= game.Players.LocalPlayer.Name then
print("SECTION RUN")
if FoundUser == false then
print("SECTION RUN")
if string.lower(plr.Name):match(string.lower(UsernameToFind)) then
print()
if PlayersServed[plr.Name] == nil then
print("SECTION RUN")
FoundUser = true
Open = false
OpenCheck = true
MainPlayer = plr
UsernameFrame:TweenPosition(DownPosition, Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1)
local PlrName = plr.Name
local plr
script.Parent.MainGui.Register.Visible = true