How do I sort this out?
local Name = Player.Name
PlayerCar = game.Workspace..(Name).Car
I want to be able to make it go into the Workspace and find the Name of the player then inside it 'Car' which is a model.
How do I sort this out?
local Name = Player.Name
PlayerCar = game.Workspace..(Name).Car
I want to be able to make it go into the Workspace and find the Name of the player then inside it 'Car' which is a model.
Try this:
local Name = Player.Name
local PlayerCar = workspace[Name].Car
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Further detail: When you say
A.B, what is happening behind the scenes isA["B"]. Sogame.Workspaceis the same asgame["Workspace"]; consequently, if you havename = "Workspace";thengame[name]that is also Workspace