#Help

1 messages · Page 1 of 1 (latest)

high bolt
#

im trying to make a userinputfield that authorizes certain players to go through a door

this is the local script that the user inputs

local LocalPlayer = game.Players.LocalPlayer
allowedplayers = {"me"}

textbox.FocusLost:Connect(function(enterpressed)
    if enterpressed then
        local text = textbox.Text
        table.find("allowedplayers")
        allowedplayers = ("allowedplayers", text)
        end
        print(text)
    end
end)

this is the server script

local UnlockOwnerDoorEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)

    if table.find(allowedplayers, Player.Name) then

        UnlockOwnerDoorEvent:FireClient(Player)

    end

end)```
#

and i have the door on a local script that uses that and it lets players go through and that part works

high bolt
#

Help

rigid wagon
#

so whats the problem?

high bolt
#

When i input the player it just doesnt work

#

The player input is working cuz it's printing the user

#

But not adding them to the list

#

@rigid wagon