I try to make a bag which u can pickup but the variable does not update so when the bag moves you cannot pick it up anymore becouse the variable is stuck on 1 coordinate point anyone help with the Mag variable?
inputservice.InputBegan:connect(function(i,g) if i.UserInputType == Enum.UserInputType.Keyboard then if i.KeyCode == Enum.KeyCode.F then for _,Door in pairs(workspace.Shops:GetChildren()) do local Mag = (Door.Center.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude if Mag <= Door.Range.Value then Door.Event:FireServer() break end end end end end)