Hello. My idea of the script here is that when you enter this vectored area your walk speed will change but when you exit the vector it will go back to the standard walk speed. Now my script is not working when it comes to changing the walk speed... Anybody know why?

Note that I am a terrible scripter and I mostly have no idea what I am doing lol.

Thank y'all in advance. ^^ `

-- Walk Speed Testing

local region = Region3.new(Vector3.new(0,0,0), Vector3.new(15,15,15))

local part = Instance.new ('Part')
part.Anchored = true
part.Size = region.Size
part.Parent = game.Workspace
part.CanCollide = false
part.Transparency = 0.5

while true do
	wait()
	local partsInRegion = workspace:FindPartsInRegion3(region,part,1000)
	for i, part in pairs(partsInRegion)do
		if part.Parent:FindFirstChild('Humanoid') ~= nil then
			print('Player Found in the region!:'.. part.Parent.Name)
			local player = game.Players.LocalPlayer
			local char = player.CharacterAdded:wait()
			local h = char.Humanoid
			h.WalkSpeed = 17.5
		end
	end
end`