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

Change message text when player joined?

Asked by 8 years ago
Edited 8 years ago

So i made 2 scripts that change a message's text when joined, local script

Local playerjoined = game.Workspace.Message

Actual script thats changing the text

game.Players.PlayerAdded:connect(function(player)
    message.Text = ('A Player has entered:' ".. player.name)
    wait(2) -- Please keep at 2 for safety
    message.Text = (' ')
end)

Please help!

0
So what is the problem, you have just listed the scripts with not explanation of the problem? User#5423 17 — 8y
0
Okay so. These scripts are message changing scripts. It doesn't actually change them when a player join ayeayeCommsta 24 — 7y

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

It won't allow me to post comments, This is not a 100% answer but will try my best

First of all what is the problem, Is it saying anything? And second of all what is message, Is it a screenGui or? Because if it were me you could of just put a screenGui in the starterGui and put textLabel on it than put a wait on it and Destroy it, Here I'll help

local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.Parent  -- Adds the screenGui


local textLabel = Instance.new("TextLabel") -- Adds the Text | textLabel
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 500, 0, 400)
textLabel.Size = UDim2.new(0, 150, 0, 150)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "A Player has entered"
-- You can change fonts and font sizes if you want
screenGui:Destroy()

If that didn't help than maybe you want the message so the message's string is that than it will do something, If so you should try the print method, I think you can use print for that,

game.Players.PlayerAdded:connect(function(player)
   print ('A Player has entered:'  ".. player.name)
wait(2) -- Please keep at 2 for safety
    print (' ')
end)

If that didn't answer it than what are you trying to do and what is wrong ;-;

0
A Message is one of those old black bars that has text in it, ahh the good old days. but that works too! thanks! ayeayeCommsta 24 — 8y
0
I think your message script didn't work because you didn't create it yet? Maybe you have to do local Message = Instance.new("message") than do all of the other stuff, Or maybe you just addressed message or you just addressed message's text wrong :D spiderman90438 17 — 8y
Ad

Answer this question