My script spits out Workspace.Manage.RoomCheck:10: attempt to call global 'check' (a nil value) What's going on?
Here's my code
-- Room Checker Script
local boardRooms = game.Workspace.Manage.SurfaceGui.Rooms
local roomDbase = game.ReplicatedStorage.RoomDatabase.Standard
Ok = Color3.new(0, 184, 6)
Ta = Color3.new(184,0,0)
repeat
wait(15)
-- Normal Rooms
check("101")
check("102")
check("103")
check("104")
check("105")
check("106")
check("201")
check("202")
check("203")
check("204")
check("205")
check("206")
check("301")
check("302")
check("303")
check("304")
check("305")
check("306")
wait(1)
-- Suite Rooms
check("207S")
check("208S")
check("209S")
check("210S")
check("307S")
check("308S")
check("309S")
check("310S")
check("400S")
wait(1)
until script.Parent == nil
function check(roomId)
if roomDbase[roomId].Owner.Value ~= "" then
boardRooms[roomId].BackgroundColor3 = Ta
boardRooms[roomId].N1.Text = roomDbase[roomId].Owner.Value
print("Room "..roomId.." assigned to board.")
end
if roomDbase[roomId].Owner.Value == "" then
boardRooms[roomId].BackgroundColor3 = Ok
boardRooms[roomId].N1.Text = "Available"
print("Room "..roomId.." cleared from board.")
end
end

10 comments
is check even a thing? i never heard of it, mayb thats whats wrong and its probarly considering it nil thats why
Yea i just checked it gave me same error, that's cuz check() isnt a thing? what r u doing?
check is a function. Look down in the code. It starts at line 44
ohh sorry i thought it wasa lua function :facepalm: lol i suck sorry
this script is not working cuz youre assigning the function, or we can say creating it after it being called
move your function creation part of the script all the way to the top, and see if it works
for the script, check isnt a thing yet, remember that your computer reads the script line by line, you were calling the function before assigning it
fixed?
did i help?
rude..