Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make my print function work properly?

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

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

3 comments

0

Also the variables are pre-defined

0

Describe, how does it not work properly? Does it error?

0

15:39:51.453 - ServerScriptService.SS_RoomManager:6: attempt to call field 'Name' (a string value)

1 answer

✓ Accepted answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.