How do I make a toggle sprint in specific areas only?

I want to make it so that when you hold shift your character gains walk speed “hold shift to sprint” but I want to make it only in a specific area not the whole entire game, (for instance, I have a part that is transparent and uncancollide and as long as you’re inside it you can shift to sprint and if you are outside the part/area then you can’t sprint even if you hold shift), how can I make such a thing?

You can use region3 so when the player is inside the region, the player can have walkspeed.

local function checker(send)
    if send and send.Character then
          if send.Character.Humanoid.CFrame == --Part location.CFrame or ---Part location here.CFrame then
                --do something here  
 
         end
     end
end


while true do
   wait(2)
   checker(game.Players.LocalPlayer)
end