Unable to make a string out of a value

This is not so much help, but more of a confused topic.

I told my script to do this:

    selected = players[index]
    print(selected) -- This works fine
    int.Value = "The killer is "..selected -- This does not work however, the error is shown below.

However, the output comes out as:

attempt to concatenate string with Instance

I don’t get why it would print, yet not allow me to make a string value out of it.

Any suggestions?

Quick note:

  • “Int” is a string value in ReplicatedStorage

The Instance metatable does not have a __concat metamethod. Instances have a Name property however which you should be using. "The killer is " .. selected.Name

1 Like

I thought that, but when I DID use it, it wouldn’t register. Saying attempted to index a value “Name” or something

You said Int is a string value, so just concatenate it with selected.Value

selected = players[index]
print(selected) 
int.Value = "The killer is ".. selected.Value
1 Like

There aren’t any errors this time, yet it still won’t work.

Even if Int is a value, selected.Value won’t work since selected is a player object, not a value.