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

How can I make my print function work properly?

Asked by 6 years ago
print("ROOM LOG: " .. player.Name "gave " .. target.Name "room: " .. room)

I know the title is terrible but how else can I describe my issue.

0
Also the variables are pre-defined VeryDarkDev 47 — 6y
0
Describe, how does it not work properly? Does it error? Amiaa16 3227 — 6y
0
15:39:51.453 - ServerScriptService.SS_RoomManager:6: attempt to call field 'Name' (a string value) VeryDarkDev 47 — 6y

1 answer

Log in to vote
0
Answered by
Amiaa16 3227 Moderation Voter Community Moderator
6 years ago

You forgot a .. after "gave" and after target.Name

print("ROOM LOG: " .. player.Name .. "gave " .. target.Name .. "room: " .. room)

Although, you can also do this instead, since print accepts multiple arguments:

print("ROOM LOG:", player.Name, "gave", target.Name, "room:", room)
Ad

Answer this question