Is it possible to find the Player who is driving a car or sitting in a vehicle seat? If so is it possible to activate a GUI for that person? This is not a request, i am not asking for a script, just asking whether or not it is possible I though FindFirstChild might work, but then I realized there would be a humanoidrootpart for every player!
You can check the weld's part1 and use :GetPlayerFromCharacter()
to find the player sitting in the seat.
I'll explain as I go through:
script.Parent.ChildAdded:connect(function(child) -- When an object is added to the seat if child.Name == "SeatWeld" then -- Make sure the object is a seat weld local root = child.Part1 -- Get the part that it is welded too local char = root.Parent -- Get the parent of the part if char:findFirstChild("Humanoid") then -- If the parent of the part contains a humanoid, we know it is a players character local player = game.Players:GetPlayerFromCharacter(char) -- Get the player from the character print(player.Name) -- Print the player's name end end end)