I'm making a server message script, here is the code:
local label = require(game.StarterGui.SM.Frame.message:WaitForChild('uhoh'))
local button = script.Parent
local box = script.Parent.Parent:WaitForChild('message')
button.MouseButton1Click:Connect(function()
label()
wait(5)
end)
I get the error "Attempted to call require with invalid argument(s)." How do I fix it?

3 comments
game.StarterGui.SM.Frame.message:GetPropertyChangedSignal("Text"):Connect(function() print(game.StarterGui.SM.Frame.message.Text) end)
sorry for lack of formatting there ^^ you can use GetPropertyChangedSignal to see when a property, such as text has changed. Didn't put the code as an answer because I am not sure if that is what you want
Thanks! yes it is, put it is an answer if you want ^^