here is my ModuleScript:
game.Players.PlayerAdded:connect(function(player)-- this is just so I can declare the player
plr = player.Name
end)
function waitforit(object)
game.Workspace:WaitForChild(object)
end
function message(parent ,text, staytime)
msg = Instance.new("Message")
msg.Parent = parent
msg.Text = text
if staytime > 0 then
wait(staytime)
msg:destroy()
end
end
function hint(text, staytime)
playergui = game.Players.plr.PlayerGui
gui = Instance.new("ScreenGui")
gui.Parent = playergui
gui1 = Instance.new("TextLabel")
gui1.Text = text
gui1.Size.X = 1000
gui1.Size.Y = 50
if staytime > 0 then
wait(staytime)
gui1:destoy()
gui:destoy()
end
end
now I want to be able to call a function like this:simplemodule.message("game.Workspace", "hello", 30) also none of these work can someone tell me what I did wrong?

2 comments
can i put the hint in every players gui using game.Players:GetChildren().playergui... etc.
Change the name of the hint gui to something like HintGui. Then loop through the players and check if the HintGui exists if it does do nothing otherwise just make the hint gui like in the hint function. Hopefully that's right.