What's the problem with this script?
01 | function script(player) |
02 | if Game.Players.PlayerAdded.Name = = "Player1" then -- Player1 is for testing |
03 | s = Instance.new ( "Message" ) |
04 | s.Parent = Game.Workspace |
05 | s.Text = "The owner has joined!" |
06 |
07 |
08 |
09 | end |
10 | end |
This should work
01 | game.Players.PlayerAdded:connect( function (player) |
02 | if player.Name = = "Player1" then |
03 | s = Instance.new( "Message" ) |
04 | s.Name = "asd" |
05 | s.Parent = Game.Workspace |
06 | s.Text = "The owner has joined" |
07 | wait ( 3 ) |
08 | game.Workspace.asd:Destroy() |
09 |
10 | end |
11 | end ) |
i added
1 | wait ( 3 ) |
2 | game.Workspace.asd:Destroy() |
or else the message will stay there forever
I'm not too sure, but aren't
1 | function |
2 | if |
3 | then |
all functions, so wouldn't you need 3 ends instead of two? Sorry if this doesn't help, new to scripting, trying to help.
1 | end |
2 | end |
3 | end |