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.
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
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?
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.