I don't know what print does all i use for it is for fun.Can you please help?
What is print for?
3 answers
print() prints a string into the Output, for example, if I were to make a script like this;
-- Sorry if this wasn't helpful --
if not workspace:FindFirstChild("TheeDeathCaster")then
repeat wait(0)until workspace:FindFirstChild("TheeDeathCaster")
print("Cool Story Bro.")
end
The Output would bring up Cool Story Bro.
You can use print() to make sure things work like let's say.
val = 1
game.Players.PlayerAdded:connect(function(plr)
if val == 1 then
print(plr.Name) -- Print's player name
end
end)
In that case I use to check if my if statements work or other pieces of script, Remember print() is only used for output.
7 comments
I knew that print was for output
That's all it's for.
I said it was only used for output.
Does this need to be on a part
Nope.
And also do i have to play the game or play the game without the player?
Play the game with the player, but you can just print something else if you don't want the player.
The print shows the message you put inside of the "print("")" on the output. So if I put
print("Hello there ROBLOX")
The output would show "Hello there ROBLOX". You can also make it print in certain circumstances like this.
if 2*2 == 4 then
print("All is right in the world!")
else if 2*2 ~= 4 then
print("Something has gone wrong GRAB A HELMET!")
end
I hope this helped :) Remember to check wiki.Roblox.com!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks for helping! This works!
No problem.