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

Why can't I find what a players car name is?

In my game I'm adding a car customizer. When you spawn the car its the players name then an s. EG: 'kittonlover101s' I know how to get the players name, but how do why is the s not being added to the variable? Any help would be appreciated!

local character = game.Workspace:FindFirstChild(playername + 's')

1 answer

✓ Accepted answer
(playername + 's') -- Incorrect

+ does not function like that

You need to do .. instead; .. is the concatenation operator.

Correct format:

local character = game.Workspace:FindFirstChild(playername .. 's')

2 comments

0

Thanks, worked perfectly.

0

You're welcome!

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