Humanoid not being detected after sitting in a seat

  1. What do you want to achieve?
    I have a Street Name gui that shows the street name after a part is touched, however, if I am in a car, and drive through it does not update, same happens when I step out, it just stop updating.

What it should do: https://gyazo.com/4137fd603828de126d93dd2c14039c48

I dont really know what to search with this issue.

Code: In starter character scripts

local player = game:GetService("Players").LocalPlayer
local roadNameText = player.PlayerGui:WaitForChild("PLD").Frame.RoadName 
local debounce = false

for _,c in pairs(workspace.RoadNameModle:GetChildren()) do
	
	
	if c:isA("Part") then
		local RoadStringValue = c.Name.Value
		c.Transparency = 1
		
		c.Touched:Connect(function(hit)
			if not debounce then
				debounce = true
				local touchingPlayer = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)  
		  	 	if not touchingPlayer or touchingPlayer ~= player then return end
				print(c.Name)
	   			player.PlayerGui:WaitForChild("PLD").Frame.RoadName.Text = c.Name
				wait(.5)
				debounce = false
			end
		end)
	end	
end

No errors are being thrown out.

Edit: missed the message, editing one second.

Edit: Saw your edit vvvvvvvvvvv

You could use Reigon3 to see when a player is in range, and then display a road name.

I’ll give this a try, I dont have to edit the script to much do I? As I barely understand that one.

Depends, probably want to read farther to the solution.

So I have looked at it, and it seems it needs to be done server sided, aside from that the script I have specificly looks for the player so is there any possible way it just refreshes or somthing?

It has to do with welding I believe.
On this part

if not touchingPlayer or touchingPlayer ~= player then return end

make it

if not touchingPlayer or touchingPlayer ~= player then print("ERROR HAPPENED") return end

I think something wrong is happening there

Yeah it prints error happend.

edit: It prints once and then nothing else, for the other parts

I’m not too good with welds, but a seat welds the player to it, then plays an animation. I’m not sure, but I think since the seat and the character are welded, they sort of combine with each other. This might be messing something up, not sure. But I would use Region3 to detect when a player is in a certain area. That’s how most people do it and it works well.