it can’t be exact position, it would have to be down to the dot, he uses a magnitude script to make sure its within 3 studs
Magnitude is the length of a vector, for example
D0RYU gets the distance between both the vectors by
EndPoint-StartPoint
Then he takes this distance and uses .magnitude, this returns the amount of studs between end and start.
Then he tests if its lower than a certain amount then if it is then do the on tunnel reached logic.
I took way too long to type this and @jaipack17 already explained it better
game.Players.PlayerAdded:Connect(function(player)
local cash = Instance.new("IntValue")
cash.Parent = player
cash.Value = 500
cash.Name = "cash"
local goldeneggs = Instance.new("IntValue")
goldeneggs.Parent = player
goldeneggs.Name = "goldeneggs"
local eggbarvalue = Instance.new("IntValue")
eggbarvalue.Parent = player
eggbarvalue.Name = "eggbarvalue"
local eggs = Instance.new("IntValue")
eggs.Parent = player
eggs.Name = "eggs"
local car = game.Workspace.deliverycar1
if car.PrimaryPart.CFrame.Position == Vector3.new(164.244, 3.919, -35.681) or Vector3.new(163.244, 3.919, -35.681) or Vector3.new(165.244, 3.919, -35.681) then
eggs.Value = eggs.Value - 100 and cash.Value == cash.Value + 100
end
end)