Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 8 years ago

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

Log in to vote
1
Answered by
funyun 958 Moderation Voter
8 years ago

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.

0
Thanks ninja laughablehaha 494 — 8y
Ad

Answer this question