I have a car and when you sit down it names a PlayerName value to the name of your player thorugh the seatweld. Now in a local script I have a script attempting to scan a model and if the PlayerName is the player's name then it sets a variable car = to the players car. This is the code I'm using to scan for the PlayerName
w = workspace.Vehicles:getChildren()
for i = 1, #w do
if w[i]:FindFirstChild("PlayerName") then
if w[i].PlayerName.Value == plr.Name then
car = w[i]
end
end
end
I can guarantee that the PlayerName value changes to the right name. Thank you for reading and helping out!
