What's the problem with this script?
function script(player)
if Game.Players.PlayerAdded.Name == "Player1" then -- Player1 is for testing
s = Instance.new ("Message")
s.Parent = Game.Workspace
s.Text = "The owner has joined!"
end
end
What's the problem with this script?
function script(player)
if Game.Players.PlayerAdded.Name == "Player1" then -- Player1 is for testing
s = Instance.new ("Message")
s.Parent = Game.Workspace
s.Text = "The owner has joined!"
end
end
This should work
game.Players.PlayerAdded:connect(function(player)
if player.Name == "Player1" then
s = Instance.new("Message")
s.Name = "asd"
s.Parent = Game.Workspace
s.Text = "The owner has joined"
wait (3)
game.Workspace.asd:Destroy()
end
end)
i added
wait (3)
game.Workspace.asd:Destroy()
or else the message will stay there forever
I'm not too sure, but aren't
function
if
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.
end
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Myst, then goes with if
Oh sorry, then, apologies