Hi,
i make a Script that checks if a Hotel Room is in use or not. There is a TextBox with the name "roomnumberhere" and a button. And there is a Model with the name "freiezimmer", in this model are boolvalues (true = in use, false = not in use). In the TextBox you enter the Number of the Room. That's my code:
script.Parent.MouseButton1Down:connect(function()
local roomnumber = script.Parent.Parent.roomnumberhere.Text
local checkvalue = game.Workspace.freiezimmer.roomnumber
print("working")
end)
If i press the Button nothing happens, it just say: roomnumber is not a valid Member of Model. It says the Problem is in Line 3.

7 comments
And after that i can do something like: if checkvalue.Value == true then ....?
Yes. Though I would recommend adding in some string.match checks to see if it's even a number, otherwise it'll throw errors if the player tries to input letters and such.
Is there a Wiki Post about that? I'm bad at scripting.
http://wiki.roblox.com/index.php?title=Function_dump/String_manipulation#string.match
http://wiki.roblox.com/index.php?title=String_pattern
And how can i use that? If it gets to long, send me a Roblox Message.
if string.match(roomnumber, "%a") or string.match(roomnumber, "%p") then print("Those aren't numbers!") end You'd replace the print with however you want to handle that. I prefer setting it back to the previous number in this event.