What do I want to achieve?
I want to make the name of the tram model, Tram(Player Name Here) so I can Identify who has each tram. Example TramPizzaisrealyAWSOME
What is the issue?
The code I have used to do this doesn’t work.
Code
function Name()
script.Parent.Name = "Tram".. Name.name
end
script.Parent.One.VehicleSeat.ChildAdded:Connect(Name)
Explorer
Note: The Tram model is in ServerStorage and it gets cloned into the Workspace when a player presses a button.
function Name()
local humanoid = script.Parent.One.VehicleSeat.Occupant
if not humanoid then return end
script.Parent.Name = "Tram"..humanoid.Parent.Name
end
script.Parent.One.VehicleSeat.ChildAdded:Connect(Name)