Im making a car, and I need to add the username of a player to a script in order for it to work. The car spawner script spawns the car in with the name "playersusername"sCar. So for example, when I spawn the car in, it would be named mcslimemansCar . I need to find out a way to insert a players username into this line of code.
local Car = workspace:FindFirstChild(--insert code here)
So what would i put inside of that slot? I want it to be playersusernamesCar but I can not figure out how to do it. I have tried adding
player.Name .. 'sCar'
into the slot, but it doesn't work. it says w001: Unknown global 'player'
The errors in the output are 13:00:47.339 - Workspace.mcslimemansCar.DriveScript:4: attempt to index nil with 'Name'
Any help would be appreciated

6 comments
If the car is spawned through a remote event from the client to the server, you can just add "game:GetService("Players").LocalPlayer.Name" as a parameter to get their name.
Are you using a touched event?
I am not using a touched event. But where would I add game:GetService("Players").LocalPlayer.Name to my code?
This is in a normal Script btw, not a LocalScript
Or is there anyway I can use a variable from a local script, to a normal script?
I dont understand, are you using a remote event?