I am scripting a room giver I have done all the coding that I can possibly do but it says Enter username is not a valid member of Players when I enter their name in the room giver. Heres what I have if you have anything that can help please let me know.
script.Parent.confirm.MouseButton1Click:connect(function()
if script.Parent.errormsg.Text == "Error: Room not available" then
warn("Room not available") else
if game.Players[script.Parent.username.Text] then
game.ServerStorage.ReceptionSystem.RoomsFolder["Room"..script.Parent.roomnum.Text].Value = true
local newVal = Instance.new("StringValue", game.ServerStorage.ReceptionSystem.CheckedIn)
newVal.Name = "Room"..script.Parent.roomnum.Text
newVal.Value = game.Players[script.Parent.username.Text].Name
local newKey = game.ServerStorage.ReceptionSystem.Card:Clone()
newKey.Parent = game.Players[script.Parent.username.Text].Backpack
newKey.Name = "Room "..script.Parent.roomnum.Text
newKey.CardNumber.Value = script.Parent.roomnum.Text
script.Parent.confirm.Text = "Checked in!"
script.Parent.roomnum.Text = "Enter room number"
script.Parent.username.Text = "Enter username"
wait(0.5)
script.Parent.confirm.Text = "Check-in"
end
end
end)
script.Parent.roomnum.Changed:connect(function()
script.Parent.errormsg.Text = " "
if game.ServerStorage.ReceptionSystem.CheckedIn["Room"..script.Parent.roomnum.Text] then
script.Parent.errormsg.Text = "Error: Room not available"
end
end)
I always get error around line 4
Here is the link for the Screenshot explorer http://www.shorturl.at/eJNV1

2 comments
Please put this in a code block. This is very hard to read.
Also, do you mind maybe showing the explorer?