Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to create Private Messages using "Instance.new"?

I thought putting the message into the player would display the message for that one person, but. Not.

game.Players.PlayerAdded:connect(function(plr) msg = Instance.new("Message") -- fixy here msg.Text = "BLAH BLAH BLAH WELCOME TO THE GAME." -- fixy here msg.Parent = plr -- fixy here game.Debris:AddItem(msg,5) end)

1 answer

✓ Accepted answer

If you have FilteringEnabled off, you can put instances in clients' cameras so that nobody else can see them.

--game.StarterPlayer.StarterPlayerScripts.LocalScript

msg = Instance.new("Message", workspace.CurrentCamera) --New message in the camera
msg.Text = "BLAH BLAH BLAH WELCOME TO THE GAME."
game.Debris:AddItem(msg, 5)
script:Destroy()

...Otherwise, if you have FilteringEnabled on, I suppose you could just put the message in the workspace. It's still going to be a LocalScript in StarterPlayerScripts.

1 comment

0

Thanks ninja

This discussion is preserved as it was. New answers, comments, and votes are closed.